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

Type the correct answer in each box. Complete the chemical formula for each ionic compound. Consult the periodic table to help you answer the question. magnesiu
What Soviet leader is credited for helping to end the Cold War?
What were most effected by the passage of title ix in 1972
How many yards in 72 Inches
What is the best summary of this stanza: The flowers do fade, and wanton fields To wayward winter reckoning yields: A honey tongue, a heart of gall, Is fancy's
You want to condition a pet pig to come running for a food reward when you blow a whistle. In the process of this conditioning effort, the main idea is to
the sun rotates blank
Can someone help? (On any of them)
How do you solve this problem correctly please help
Plz plz plz someone help ASAP DUE TODAY!! What is an annotation I can write about this paragraph! PLZ PLZ PLZ HELP WILL MARK BRAINLIEST!!
good job