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

QS 6-2 Inventory costs LO C2 A car dealer acquires a used car for $16,000, with terms FOB shipping point. Compute total inventory costs assigned to the used car
An operational definition is___
help help! please help!!
Factor the expression below. 25x2 + 30x + 9 (5x - 3)(5x-3) B. (25x+3)(x+3) C. (5x+3)(5x + 3) D. (25x - 3)(x-3).
Who wrote the statement?
Which function represents exponential decay? f(x) = f(x) = f(x) = 4 f(x) = 4
The Tuskegee Institute was A) a natural museum, B) an investment bank, C) a gentleman’s club, D) a vocational school for African Americans.
Please do 69 and 70 quick please
On January 1st, the temperature at noon was 10.2℉. By midnight, the temperature had decreased by 13.5 degrees. What was the temperature at midnight?
Simplify 2⁸ ×3⁷ by 3⁵ × 2⁵ and leave your answer in standard form