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

what functions do proteins,carbohydrates, lipids and nucleic acids perform
name the five types of sentences..
name the five types of sentences..
what functions do proteins,carbohydrates, lipids and nucleic acids perform
name the five types of sentences..
what functions do proteins,carbohydrates, lipids and nucleic acids perform
name the five types of sentences..
name the five types of sentences..
what functions do proteins,carbohydrates, lipids and nucleic acids perform
name the five types of sentences..