-6
我的第二個問題是基於服務創建小費計算器。如果服務是驚人的,那麼計算一個20%的提示,如果它可以計算一個15%的提示,並且如果它的可怕計算一個10%的提示。基於服務的小費計算器Python
編輯:從Raj的評論on the other post與他的代碼:
繼承人我做了什麼的問題
rbill = float(input("What is the total bill?"))
print("What was the level of service?")
service = input("Please choose amazing, okay, or horrible:")
while service = amazing:
tip=(bill*0.20)
total=(bill+tip)
print("The bill was $",bill)
print("The service was",service)
print("The tip is",tip)
print("The grand total with the tip is $",total)
- 拉吉3月8日在6:22
拉吉3月8日你覺得這是一個免費的編碼服務或什麼? **不是。** –
我投票結束這個問題作爲題外話,因爲SO不是一項家庭作業完成服務。 – TigerhawkT3
他只是忘記包含他已經寫入帖子的代碼。你可以在http://stackoverflow.com/questions/35860427/python-hw-questions-phone-number的評論中找到它。 :-o – MSeifert