python if statement
usrinput = input(">> ")
if usrinput == "Hello":
print("Hi")
elif usrinput == "Bye":
print("Bye")
else:
print("Okay...?")
python if statement
usrinput = input(">> ")
if usrinput == "Hello":
print("Hi")
elif usrinput == "Bye":
print("Bye")
else:
print("Okay...?")
python if and
if foo == 'abc' and bar == 'bac' or zoo == '123':
# do something
python if
if num<5:
print('Num less than 5')
elif 5<= num <=9:
print('Num between 5 and 9')
else:
print('Num more than 9')
python if condition
if my_condition:
# Do some stuff
print("Hello You!")
else:
# Do some stuff
print("Hello World!")
python if condition
a = 200
b = 33
if b > a:
print("b is greater than a")
else:
print("b is not greater than a")
python or in if statement
weather = input("How's the weather? ")
if weather == "Good!" or weather == "Great!":
print('Glad to hear!')
else:
print('Too bad!')
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us