Answers for "and python if"

1

python if

if num==5:
  print("Num equal to 5")
elif num > 5:
  print("Num more than 5")
else:
  print("Num smaller than 5 but not equal to 5")
Posted by: Guest on March-06-2021
1

or in if statement python

weather == "Good!" or weather == "Great!": 

# Or the following  

weather in ("Good!", "Great!"):
Posted by: Guest on April-03-2021
0

If or Python

x = 1; y = 1

if x == 1 or y == 1:
  print(x, y)
# 1 1
Posted by: Guest on October-26-2021
0

python if

def e(x):
	if x == "Sunny" and x == "sunny":
  		print('Remember your sunglasses!')
	elif x == "Rainy" and x == "rainy":
  		print('Do not forget your umbrella!')
	elif x == 'Thunderstorm' or x == 'thunderstorm' or x =='Stormy' or x == 'stormy':
      print('Stay Home!')
    
x = input('What is the weather?')
Posted by: Guest on October-02-2020

Python Answers by Framework

Browse Popular Code Answers by Language