Answers for "nested if else in python"

1

how to use nested if else in python

Your_hight = int(input("What is Your hight:- "))
if Your_hight >= 120:
    print("You are good to go to the roller coster")
    your_age = int(input("What is your Age:- "))
    if your_age > 8:
        print("This is your ticket and have your seat on the roller coster")
    else:
        print("Sorry you can't go to the roler coster")
Posted by: Guest on August-09-2021
2

nested if statements python

if expression1:
   statement(s)
   if expression2:
      statement(s)
   elif expression3:
      statement(s)
   elif expression4:
      statement(s)
   else:
      statement(s)
else:
   statement(s)
Posted by: Guest on April-14-2021
2

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")
Posted by: Guest on January-01-2021
6

python if elif

num = 20
if num > 30:
  print("big")
elif num == 30:
  print("same")
else:
  print("small")
#output: small
Posted by: Guest on May-09-2020

Python Answers by Framework

Browse Popular Code Answers by Language