Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
tip calculation
#python 3.5.2 yogesh={"food":"chinese","amount_paid":400} sandeep={"food":"southindian","amount_paid":700} tipl=0.1 tiph=0.2 yogiamt=yogesh.get("amount_paid") sandyamt=sandeep.get("amount_paid") if yogiamt<500: print(" yogi your bill including tip",tipl+yogiamt) else: print("yogi your bill including tip",tiph+yogiamt) if sandyamt<500: print("sandeep your bill including tip",tipl+sandyamt) else: print("sandeep your bill including tip",tiph+sandyamt) finalyogi=(yogiamt+tipl) finalsandy=(sandyamt+tiph) if finalyogi>finalsandy: print("yogesh ne zyada bill bhara") else: print("sandeep ne zyada bill bhara")
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
we
Emails_Python
Ghost 👻👻👻👻👻 Game 👻👻👻👻👻👻
ConstructorBehaviourInInheritance
Convert String to Lower Case
print
Implementation of Singleton pattern
jsa
Factorial number using recursion
GINGERMANZ
Please log in to post a comment.