Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
NewFoodTipper
#Python 2.7.17 #Name two of your favorite foods and then create a #new one by joining them #add a 15% and 20% tips on total bill # #this code is created by RezaulHoque on September 21,2021 #contact: jewelmrh@yahoo.com ### #note: codes shared by Rezaul Hoque on rextester are not for sale; they are created and shared to facilitate the algorithm learning process; many like Hoque use this platform to practice programming ;Rezaul hopes his contribution helps others to fine tune their learning; ### print "Name your two favorite foods:\n" food1=input("food1?\n") food2=input("food2?\n") new_food=food1+food2 print "And the new food is\n ",new_food price1=int(input("price of food1?\n")) qty1= int(input("quantity of food1?\n")) price2=int(input("price of food2?\n")) qty2= int(input("quantity of food2?\n")) NewFoodPrice=int(input("price of new food for a plate?\n")) total = price1*qty1+price2*qty2+NewFoodPrice print " Total bill is Tk ",total tip1=total*0.15 tip2 = total*0.20 print "\n15% tip: Tk ",tip1, "\n20% tip: Tk ",tip2 grandTotal1= total+tip1 grandTotal2= total+tip2 print "\nfor 15% tip grand total is Tk ",grandTotal1 print "\nfor 20% tip grand total is Tk ",grandTotal2
run
|
edit
|
history
|
help
0
PyClass2
Looking at the /etc folder... :)
Dictionary - convert to lowercase
Aufgabe 15
Цідило
codeacademy python tasks
sdfgthyjuyhtgrf
mergeTrees
irctcbot
python2 - division - 0