Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

Write a program that reads a floating-point number and prints "zero" if the number is zero.Otherwise, print "positive" or "negative".

"

******************************************************************************************

Thank you so much,

my code:

####

# This program will read a floating-point number and print "zero"

#if the number is zero. Otherwise, print "positive" or negative".

#Add "small" if the absolute value of the number is less than 1,

#or "large" if it exceeds 1,000,000.

####

# Ask the user to input for floating-point number.

print ("The system will show you whether it is Negative, Positive, Small or Large number.")

print ()

x = int(input("Please in put any number: "))

# condition for checking the "zero", negative and Positive number. Then print.

if x == 0.0:

  print ("Zero")

elif x < 0:

  print ("Negative")

else:

  print ("Positive")

# Conditions cheking for small and large number. Then print.

if abs(x) < 1:

  print ("and Small")

elif abs(x) > 1000000:

  print ("and Large")

else:

  print ("")

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question