Answers for "and if condition in python"

11

if else python

# IF ELSE ELIF 

print('What is age?')
age = int(input('number:')) # user gives number as input
if age > 18:
    print('go ahead drive')
elif age == 18:
    print('come personaly for test')
else:
    print('still underage')
Posted by: Guest on August-12-2020
1

if statement python

number = 5
if number == 5:
  print("number equals 5")
else:
  print("number does not equal 5")
Posted by: Guest on December-14-2020
0

if statement python

temperature = float(input('What is the temperature? '))
    if temperature > 70:
        print('Wear shorts.')
    else:
        print('Wear long pants.')
    print('Get some exercise outside.')
Posted by: Guest on October-11-2021

Python Answers by Framework

Browse Popular Code Answers by Language