TheElement99
TheElement99 TheElement99
  • 17-05-2021
  • Computers and Technology
contestada

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

Respuesta :

WiseKun WiseKun
  • 17-05-2021

I am assuming that user_val is an inputted variable and a whole number (int)...

user_val = int(input("Enter a number: "))

if user_val < 0:

   print("negative")

else:

   print("non-negative")

Answer Link

Otras preguntas

How does Omari feel as he and his parents arrive at the family reunion? A) He is happy and excited to meet all his cousins. B)He is nervous and feels like the r
A broker has a large billboard sign located in a busy intersection. The billboard must
FS is -4, -6 and T is -7, -3 find R
What happens to the number of valence electrons within a family (Group 1 or 17) as atomic number increases? How does this affect the properties of the elements
Please help with this iready question
How did Gavrilo Princip become involved in the plot, and what motivated him to become an assassin?
Please graph x^2 when x<1
what is the value of the expression when w=7x=5?
Jhsisutagwwieietehsisutsgsneisuysgebeieiejehgeys
I need help with this essay about the Russian civil war I WILL GIVE ALL MY POINTS