Write a Python program to check whether a number is negative, positive or zero.

PROGRAM

# Input and Output for Basic Data Types in Python
# Integer
int_input = int(input(“Enter an integer: “))
print(“You entered integer:”, int_input)
# Float
float_input = float(input(“Enter a float number: “))
print(“You entered float:”, float_input)
# String
string_input = input(“Enter a string: “)
print(“You entered string:”, string_input)
# Boolean
bool_input_str = input(“Enter a boolean value (True/False): “)
print(“You entered boolean:”, bool_input)

OUTPUT

TRY THE ABOVE CODE

Leave a Reply

Your email address will not be published. Required fields are marked *