print "############################################################################################################" print " This Program is written to calculate the exact payable amount of yesterday dinner at ssshanwari" print " Formula is simple I have not divide the amount of guest to uzair and ahmed becuase Rizwan Muddasir" print " and ziaullah are our batch fellow its the combine decision of our batch fellows" print " please enter your name is small letter as uzair,ahmed ,zaheer,ahad, ikram to get result" print "############################################################################################################" name = raw_input("Enter your name: ") totalmutton=4610 totalicecream=1040 eachicecream=130 perheadmutton=totalmutton/9 ahmedtotalmutton=perheadmutton uzairtotalmutton=perheadmutton muttonchargeforbatch1=(totalmutton-(ahmedtotalmutton+uzairtotalmutton))/4 icecreamchargeforbatch1=totalicecream-260 icecreamchargeforbatch1guest=icecreamchargeforbatch1-390 icechargeperheadguestonbatch1=icecreamchargeforbatch1guest/4 print "Total Mutton:",totalmutton print "Total IceCream:",totalicecream if name=="uzair": amount=uzairtotalmutton+eachicecream print "total to pay: ",amount print "mutton:" ,uzairtotalmutton print "icecream:", eachicecream elif name=="ahmed": amount=uzairtotalmutton+eachicecream print "total to pay: ",amount print "mutton:" ,uzairtotalmutton print "icecream:", eachicecream elif name=="zaheer": amount=muttonchargeforbatch1+icechargeperheadguestonbatch1+eachicecream print "total to pay for zaheer is :", amount print "mutton:" ,muttonchargeforbatch1 print "ice cream you eat:", eachicecream print "ice cream guests:", icechargeperheadguestonbatch1 elif name=="zohaib": amount=muttonchargeforbatch1+icechargeperheadguestonbatch1+eachicecream print "total to pay for zohaib is :", amount print "mutton:" ,muttonchargeforbatch1 print "ice cream you eat:", eachicecream print "ice cream guests:", icechargeperheadguestonbatch1 elif name=="ahad": amount=muttonchargeforbatch1+icechargeperheadguestonbatch1+eachicecream print "total to pay for ahad is :", amount print "mutton:" ,muttonchargeforbatch1 print "ice cream you eat:", eachicecream print "ice cream guests:", icechargeperheadguestonbatch1 elif name=="ikram": amount=muttonchargeforbatch1+icechargeperheadguestonbatch1 print "total to pay for ikram is :", amount print "mutton:" ,muttonchargeforbatch1 print "ice cream you eat 0:", print "ice cream guests:", icechargeperheadguestonbatch1
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question