if in python
# if statment
#'if' gives condition in statement to make program more efficient.
a=10
b=5
if a%b==0:
print('true')
output:
true
if in python
# if statment
#'if' gives condition in statement to make program more efficient.
a=10
b=5
if a%b==0:
print('true')
output:
true
python if and
if foo == 'abc' and bar == 'bac' or zoo == '123':
# do something
if syntax in python
variable_name = input("y/n? >> ")
if variable_name == "y":
print("That's good! :) ")
# note the double equal signs. only a single equal sign will receive a Syntax error blah blah blah message.
elif variable_name == "n":
print("That's bad! :( ")
else:
print("You blow up for not following my instructions. Detention forever and get lost!")
python if condition
if my_condition:
# Do some stuff
print("Hello You!")
else:
# Do some stuff
print("Hello World!")
if else python
# IF ELSE ELIF
age=int(input("Enter your age:"))
if age<=18:
print("sorry your are not eligible for vote")
elif age>=18:
print("u are eligible for vote")
else:
print("in some how the previou's condition fails else part will run")
or in if statement python
weather == "Good!" or weather == "Great!":
# Or the following
weather in ("Good!", "Great!"):
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