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 PLEASE PLEASEEEE HELP ME
Find the value of x and the value of y
Does an acute angle measure less than 90 degrees?
Computers designed using the von Neumann Architectures have two buses: one for data and one for instructions
help plz mathematics 6th grade ALEKS
There is a bag filled with 4 blue and 5 red marbles. A marble is taken at random from the bag, the colour is noted and then it is replaced. Another marble is
What are the coordinates of point B?
The to bring Its primary purpose was to was al company that established and other goods back to Britain.
1.1 Which of the following is a non-metal ?A ZnB FeC NeD Na​
Can someone help me real quick please