Wednesday, June 19, 2019

if elif and else loop in python

s = input ("Input your name: ")
if s == "Tom":
    print("Hello ", s)
elif s == "Carmen":
    print("I'm so glad to see you ", s)
elif s == "Sonia":
    print("I didn't expect you ",s)
else:
    print("Hello unknown")


output::

No comments:

Post a Comment

python class topic video