Wednesday, June 19, 2019

if loop in python

s = input ("Input your name:")
if s == "Tom":
    print("HELLO ", s)


output::

note:after "if " statement ":" is mandatory other wise ,compiler through the error

No comments:

Post a Comment

python class topic video