1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
castortr0y [4]
3 years ago
6

Create a conditional expression that evaluates to string "negative" if user_val is less than 0, and "non-negative" otherwise.

Computers and Technology
1 answer:
taurus [48]3 years ago
4 0

Answer:

The modified program is as follows:

user_val = int(input())

cond_str = 'non-negative'  

if user_val < 0:

   cond_str = 'negative'  

print(user_val, 'is', cond_str)

Explanation:

This gets input for user_val

user_val = int(input())

This initializes cond_str to 'non-negative'

cond_str = 'non-negative'

If user_val is less than 0

if user_val < 0:

cond_str is updated to 'negative'

   cond_str = 'negative'  

This prints the required output

print(user_val, 'is', cond_str)

You might be interested in
Please help me and solution in c language​
salantis [7]
Ummmm the solution is ummm brb
3 0
3 years ago
Give five example of a dedicated device ​
kogti [31]

Common examples are ATMs, POS terminals, and airport ticket vending machines. Cashierless checkout technologies like “Scan and Go,” inventory scanning, corporate-owned work profile devices, self-ordering kiosks, mobile devices, and POS/m POS are some of the most common examples of dedicated devices in use today.

6 0
2 years ago
Read 2 more answers
Me Completan Pliiiis
Brut [27]
Can you translate please i’ll help better
4 0
3 years ago
Let's now use our new calculator functions to do some calculations!
Sophie [7]

Answer:

Ans1.

double calc_a;

calc_a=Math.pow(3.0,2.0)+Math.sqrt(9);

Ans2.

double calc_b;

calc_b=((12.0/3.0)-(2.0*4.0));

Ans 3.

double calc_c;

calc_c=(Math.sqrt(16.0)*(7.0+9.0));

Ans 4.

double calc_d;

calc_d=Math.pow(7.0,2.0)/Math.sqrt(49.0);

Explanation:

The expressions are done with Java in answer above.

6 0
3 years ago
What do you understand by technological depenence?
son4ous [18]

Answer:

It helps you understand stuff faster

Explanation:

7 0
3 years ago
Other questions:
  • The program prompts the user to interactively enter eight batting averages, which the program stores in an array. The program sh
    9·1 answer
  • 32.
    11·1 answer
  • In Windows 7/Vista, the information that establishes basic settings such as the location of the operating system and other key s
    7·1 answer
  • Describe how antipoverty programs can discourage the poor from working. How might you reduce this disincentive? What are the dis
    11·1 answer
  • Among the eight unique features of​ e-commerce, which is related to the ability to interact with web technology​ everywhere?
    14·1 answer
  • What is software piracy?
    11·1 answer
  • 4. Select the correct answer.
    9·1 answer
  • Explain four sitting postures in a computer laboratory​
    9·1 answer
  • Busco a talcotalco38
    14·2 answers
  • What happens if part of an ftp message is not delivered to the destination?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!