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

In the 2010, New York City Marathon, 42,429 people finished the race and received a medal. Before, the race, the medals had to be ordered. If you were the perso
What is the main function of the arthmetic logic unit?
find the gcf of the terms of the polynomial. 45b 27 a) 3 b) 5 c) 9 d) 15
How much clean drinkable water do we have?
what's the proper name of the quadrilateral below
please help with the examples only extra points given
write each height using scientific notation 1700000000 and 152000000
Question Part Points Submissions Used Find a polynomial of degree n that has the given zeros. (There are many correct answers.) Zeros Degree x = −4, 5, 7
Write an expression, 8 less than the product of 5 and -4
the mathematical expression 9 € T means