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

another word for will wonder
Who wanted to build a French empire in the new World?
which of the following sentences has a forceful tone
Please Please Help Me In This Science Homework!!!!! Questions 1 to 4!!!!! I am saad!!! Hep Me!!!!
Dickinson supports her idea that poetry is more expensive than prose by a. Obtaining the perspectives of knowledgeable people. b. Imagining a life full of wond
three physiological changes which occur during adolescence
Question 3 (Multiple Choice Worth 6 points) (09.01 LC) Amy is playing a board game and rolls two number cubes. Let A = {the sum of the number cubes is odd}, and
what do you call it when somebody spends 20 years in the 24th row of a theater
what are the benefits of conducting an interview to gather details for a problem-and-solution essay?
How many different ways are there to arrange the letters A, B, A, and B?