"Sound Heartbeat"

Soundheartbeat.com - ranking and value
learn python free code

1 Project Daily, Learn python with Pizza Billing

Hey guys! It’s day 3 of my learning and I have made the project of calculating bill amount of Pizza. here, we are going to learn python free with project based life skill. adding daily a one project to our learn python free set.

Python will be within your limit just give 1 daily project dose to your self to learn python smoothly. Enhance your value of your resume to add skill in the resume.

So , here are the instructions

1)Pizza size = Small(S), Medium(M) or Large(L)

2)Do you want a pepperoni on pizza.

Write Y for Yes and N for No.

3) Would you like to have some extra cheese .

Write Y for Yes and N for No

These are the 3 inputs you should consider while taking the data from the customer.

To greet the customer , first write a welcome line to the customer. Such as .

print(“Hi, Welcome to the Pizza world”)

Now , write the inputs given above.

Size= input(“Which size of Pizza you would like to order?Small(S),Medium(M) or Large(L):”)

Pepperoni input(“Would like to add pepperoni on pizza ?Y/N:”)

Extra_cheese= input(“Would you like to add some extra cheese on pizza?Y/N:”)

These are 3 inputs remember, the important thing is,these are individual condition and should have it’s if and else statements { #which was one of my mistake)

Now , multiple if and else statement given below to run this code.

if size == "S": # character under" ""
print(f"cost of small pizza $ {bill}")
elif size=="M":
print(f"cost of medium pizza $ {bill}")
elif size=="L":
print(f"cost of large pizza $ {bill}")
if add_pepperoni=="Y": # mark this important
bill+= 2
print(f"Total Bill of pizza with pepperoni $ {bill}")
if extra_cheese=="Y":# important
bill+= 1
print(f"Total Bill of pizza with pepperoni and extra cheese $ {bill}")
print(f"Total bill for Pizza $ {bill}")

Things to remember while writing this code
1)Condition == “_”: #my first mistake
2) while checking condition of second input which is pepperoni choice . Start new if statement.

3) while checking 3rd input condition for extra cheese write new if statement under same indentation of earlier if statement. Because it is a continuous condition one after ther other . So, things must be considered while writing it.

Happy coding 😊

Reference – replit.com




reference: replit.com<<click here>>

Pizza Billing using python #Basicsofpython

TikTok and John Lennon Estate Joins To Bring Classic Songs To Creators

On late singer John Lennon’s 80th birthday, TikTok and the singer’s estate (shoulder with Universal Music) are partnering to provide creators access to his various most popular songs. “Instant Karma! (We All Shine On),” “Imagine,” “Mind Games,” “Beautiful Boy,” “Woman,” “Happy Xmas (War Is Over),” “Give Peace a Chance,” “Stand Read more…

error: Content is protected !!
en_GBEnglish (UK)