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

How might life be different today if humans had stepped into the fossil record sooner?
How did the discovery of the refuses factor affect societ
What is the wavelength of radio waves? A. between 1 x 10-3 and 1 x 10-1 meters B. less than 1 x 10-11 meters C. more than 1 x 10-1 meters D. between 1 x 10-
please help the answer i put idk if its correct (brianlest if correct)
Kevin will take 4 math tests this term. All of tests are worth the same number of points. After taking the first 3 tests, his mean test score is 88 points. How
That time of year thou mayst in me behold When yellow leaves, or none, or few, do hang Upon those boughs which shake against the cold, Bare ruin'd choirs, whe
Which type of information requires citation? A another writer’s interpretation of a subject B common knowledge about a subject C your interpretation of a subjec
evaluate 3r(t+4) if r=2 and t=7
PLEASE HELP UWU describe the graph: f(x)= (3/4)^x +4
Help me with this please