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

The visible surface of the Sun, which is also the deepest layer we can see with our eyes, is in which region of the Sun?
create an equation uaed to setermine number oh hours joe worked.
which of the following is a cumulative risk? not wearing a seatbelt, Eating a high -fat diet, riding a bike without a helmet, abstaining from the use of alco
what machine can make 138,800 small paper clip in one day and another machine can make 84,250 large paper clips in one day how many more small paper clips then
unscramble this sentence: that the store had dyed blue roses
Choose the equation below that represents the line passing through the point (−5, 1) with a slope of 3/2
how much pounds is 50 kilograms
HOW TO WRITE 20484163 IN EXPANDED FORM
which best describes the phrase common good
Explain history in three sentences.