Tuesday, July 22, 2025

WTP in python - check Positive, Negative, or Zero

 

Ask the user to enter a number and print whether it is positive, negative, or zero.


# Positive, Negative, or Zero Checker

#take the input from user 

number=float(input("Please enter the number : "))


# check the condition 

if (number>0):

    print(f" {number} is postive")

elif(number<0):

    print(f"{number} is negative")

else:

    print(f"{number} is zero")

No comments:

Post a Comment

Interview Question 18 : What are oinstall and dba groups? Why we assign these groups to oracle user ?

  What are oinstall and dba groups in Oracle? Short answer oinstall → Controls software ownership and installation dba → Controls databa...