Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

if statement in python

user_info = input("How may I help you?: ")
if user_info == "on":
    print("Light is Turned Om")
elif user_info == "off":
    print("Light is turned Off")
elif user_info == "status":
    input("All are Good.What do you need?: ")
    print("I don't have it")
else:
    print("Shutdown processing are being Ready")
   #copy the code to your py script to have the results!!!
 
PREVIOUS NEXT
Tagged: #statement #python
ADD COMMENT
Topic
Name
1+4 =