P_29 Multiple if Statements in Python | Python Tutorials for Beginners

preview_player
Показать описание
In this lecture we have discussed multiple if statements with real life example and flowchart. We have written down a program to show working of "multiple if" in python.

*********************************************

Connect & Contact Me:

*******************************************

More Playlists:

#coding #pythonforbeginners #python #jennyslectures #pythonprogramming
Рекомендации по теме
Комментарии
Автор

Ma'am This message is a heartfelt message from my side.I am in UPES University 1st year and I didn't used to get anything that used to be taught in class in C. I just want to thank you for saving me in my 1st sem Because of you only I was able to score a decent score in C even after studying just before the exam itself. You are the best teacher one can ever get.
The way you teach even such complex topics like array, pointers etc is just amazing.Now I have started to study DSA from your channel .And will remain consistent throughout in my coding journey.
Thanks a lot ma'am.

Arjun_BH
Автор

Ma'am I am saying my heart felt thanks to you, , because the way you taught the c language is really awesome and recently i got the 1st sem results and i was really shocked 😲 that i got 57 out of 60 in c .. I didn't get like this in any other subject.. u r the reason for my happiness still now i can't believing so i decided to watch all the languages from ur

marikantipavankumar
Автор

My favourite language after mother tongue 🐍🐍🐍🐍🐍🐍🐍🐍

dontsubscribepleaseibeg
Автор

height=int(input("enter the height"))
if height>6:
print("you can write")
else:
print("you cannot ride")
age=int(input("enter the age"))
photo=int(input("enter the photo money"))
if (age<=18):
print(f"pay {photo+200}")
elif (age>15):
print(f"pay {photo+180}")
else:
print(f"pay {400+photo}")

sathwikchinta
Автор

aisa lag rha h jaise aap sirf mujhe hi pdha rahi h...dekh lijiye hamari is deewangi ne hame aapke 29th lecture pe phaucha i will go to 125th soon

dr.adityamalik
Автор

Lecture 29✅
Lecture 125, I am coming.

shiv_gourav
Автор

i hope one day i will expert in python programming after got learned & practice through your videos \ Thanks a lot mam 😀
print("To check wheter you are able to ride Roller Coaster or not?\n")
height = float(input("Input your height: "))

if height > 4.5:
print("Congrats! you are able to ride Roller Coaster")
else:
print("Sorry! you are not able to ride")

age = int(input("\ninput your age: "))
bill = 0
if age > 12:
bill = 100
print("Ticket price is $100")
elif age > 18:
bill = 200
print("Ticket price is $200")
elif age > 30:
bill = 500
print("Ticket price is $500")
elif age > 60:
print("you are able to ride")
else:
print("you are not allowed for ride")

photo = (input("Do you want to capture photos?(yes/no)\n"))
if photo == 'yes' or photo == 'Yes':
bill = bill + 50
print(f"final price of your ticket is ${bill}")
else:
print("ok")

mr_affan
Автор

for the above example, when we enter height as less than 3, and run the program, it is asking for age as well

rsg
Автор

kindly c++ lectures completed madam immediately....pakistani students also beneficials from yours lectures you alot from pakistan

rizwangibralter
Автор

Mam when i try the above roller coaster
Code i was getting indentation error again and again by changing and running the and again it was giving me the same answer please give me a solution about this mam.what should i want to do .
Another thing mam i was doing it in my mobile 📱 itself at present i dont have any laptop.

code_cam_edu_
Автор

Hi thanks for all those video. I have a question when i put age = 10, I have those 2 reply : Tickets price 150 Rs and Ticket price 250 Rs...

slothylyn
Автор

Is it necessary to write bill=0 at the top? Won’t the program work just fine without it?

aeri
Автор

Dear Miss Jenny
Have a nice day
Your video lecture is helping a lot but can you recommend a good book to study python.
A huge bundle of thanks from Pakistan.

husnainhyder
Автор

Thanks Jenny! you worked amazing. Can you please update that either you have some videos for using python for ML algorithms.

mahwishkundi
Автор

when do we get CHAINED CONDITIONAL video Jenny ma'am?

thank you for all you do. ❣❣❣❣

johnjulius
Автор

# multiple if statements
height=int(input("what is your height?"))
bill=0
if height>=3:
print("you can ride")
age=int(input("what is your age?"))
if age<12:
bill=150
print("ticket price is 150rs")
elif age<=18:
bill=250
print("ticket price is 250 rs")
else:
bill=500
print("ticket price is 500 rs")
want_photo=input("do you want to take photo(y/n)?")
if want_photo=='y' or want_photo=='y':
bill=bill+50
print(f"your total bill is {bill}")
else:
print("can't ride🥺")
print("thank you..enjoy the ride!!🙂")

SarathReddyKakarla
Автор

h=float(input("enter persons height: "))
if h >= 6 :
print("you are allowed inside")
a=int(input('enter persons age'))
if a >= 18:
ticket = 300
print("your ticket price is 300 Rs ")
elif a >= 10:
ticket = 200
print("your ticket price is 200 Rs ")
else :
ticket = 0
print("enjoy free ride ")
photo = input('need photo say Y or N ')
if photo.lower() == 'y':
print('you need to pay 50 Rs extra ')
pticket = ticket + 50
print(f"your total price with photo is {pticket}Rs ")
else :
print('you have not opted for photo')
print(f" your total amout is {ticket}Rs")
pticket=ticket
food = input("Need food say Y or N")
if food.lower() == 'y':
food_choice = input('select veg or nonveg')
if food_choice.lower() == 'veg':
print("you have selected veg you need to pay 150 Rs")
foodbill = 150
total_amount = pticket + foodbill
print(f'your total price include food and photo is {total_amount} Rs ')
elif food_choice.lower() == "nonveg" :
print("you have selected nonveg you need to pay 300 Rs")
foodbill = 300
total_amount = pticket + foodbill
print(f'your total price include food and photo is {total_amount} Rs ')
else :
print('you have not opted anything invalid choice:')
foodbill = 0
total_amount = pticket + foodbill
print(f" you need to pay {pticket} Rs ")
else :
print("you have not opted food ")
print(f'total bill without food is {ticket} Rs')
else :
print('you are not allowed for the play')
print('thank you for visiting have a nice day')

venkatanaveen
Автор

Mam why don't you wrote leap year program in this wayy

TriveniTriveniGadela-ovfr
Автор

height=int(input("enter your height in feets="))
if height>3:
print("you can take a ride")
age=int(input("enter your age="))
photos=int(input("you want to take photos.If yes then enter 50 otherwise 0::"))
if photos==50:
if age<12:
print(f"pay {150+photos}")
elif age<18:
print(f"pay {250 + photos}")
else:
print(f"pay {500 + photos}")
if photos==0:
if age<12:
print(f"pay {150+photos}")
elif age<18:
print(f"pay {250 + photos}")
else:
print(f"pay {500 + photos}")
else:
print("you cannot ride")

alok_kr_verma
Автор

user_input = input("which field are you choosing to pursue?: ")

if user_input == 'engineering' :
which_engg = input("under engineering, which stream are you decided to enter?: ")

if which_engg == "mech" :
print(f"Anna university is best to study for {which_engg} engineering.")

else:
print(f'IIT, IIM, BITS were good place to study {which_engg}.')

elif user_input == 'goverment exams' :
which_govt_exam = input('for which exam you are going to prepare?: ')

if which_govt_exam == 'upsc' :
print(f"central govt affiliated centers is the best option to study incase os {which_govt_exam}")

else:
print(f'there are many govt as well as private institutions are there to learn the {which_govt_exam}.')


else:
if user_input == 'medical' :
which_medical = input('among all branches, which was you choosed to learn?: ')

if which_medical == 'mbbs' :
print(f"goverment colleges were the best place to learn the {which_medical}.")

else:
print(f'all deemed universities are the right spot to study the {which_medical}')


print(f"I wish you all the best for your successful carieer upliftment.i pray the omnipotent god to assist you, for your preparations on ypur {user_input}")

MARUTHU_