fjsmith7166 fjsmith7166
  • 09-11-2017
  • Computers and Technology
contestada

Write a program that reads a floating-point number from the user and prints "zero", "positive" or "negative"

Respuesta :

rsmith6559
rsmith6559 rsmith6559
  • 10-11-2017
```
#!/usr/local/bin/python3

foo = float( input( "Enter a number: " ) )
if( foo < 0.0 ):
    print( "negative" )
elif( foo > 0.0 ):
    print( "positive" )
else
    print( "zero" )

exit( 0 )
```

Answer Link

Otras preguntas

simplify the expression. (2x5)4 a. 16x^20 b. 16x^9 c. 2x^625 d. 2x^20
Use substitution to solve the system of equations. A. (–28, 5) B. (2, –28) C. (2, –5) D. (11, –8)
the interference of two sound waves of slightly different frequencies produces
Personal satisfaction and wellness in your own body can come from: question 4 options: chronic dieting. use of over-the-counter weight loss pills. acceptance of
why do authors use character development? a. so that readers can see who the protagonist is b. to show readers what the characters are like c. to tell the story
Can someone please answer. There is one problem. There's a picture. Thank you!!!
Choose the word that best completes this sentence: Este es un mapa del mundo. B. blanco. C. médico. D. grande.
Catholics were discriminated against during the second grade awakening because they
a town recently experienced a population decrease. in 2 or 3 sentences, explain the effect of this population decrease on the demand for clothes and tell how th
Which substance has the lowest [H+] concentration but is still considered an acid? milk blood gastric fluid household lye