chubbybunny1304 chubbybunny1304
  • 21-07-2022
  • Computers and Technology
contestada

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

Respuesta :

1207449
1207449 1207449
  • 21-07-2022

Answer: I am supposed to write a few lines of code to create a conditional expression (ternary operation) that evaluates to string "negative" if user_val is less than 0 and "non-negative" if 0 or greater than 0.

The code I currently have prints "negative" when the number is less than zero but when a number 0 or greater is assigned to user_val it doesn't print "non-negative."

Answer Link

Otras preguntas

Please Help!!! 75 points!!!
can you help me simplify 5c-4d-c-7d please
What graph best represents the solution to the equality y - 2x > -8
Work hard and try hard persistent Name an example or examples to do with work hard and try hard persistent
Bruno est patient, mais Claire et Béa Sont
Fine the area of the square when z=3/2
give a scenario of a patient with type 2 diabetes. the symptom, causes, complication and how to treat the disease? as a nurse what can you do to help the patien
HELP PLEASE!!!! What is the net force on this object?
0.7 moles of uranium to grams of uranium​
compare and contrast two types of plants described in this passage