【发布时间】:2015-01-25 23:11:25
【问题描述】:
print ("How much does your meal cost")
meal = 0
tip = 0
tax = 0.0675
action = input( "Type amount of meal ")
if action.isdigit():
meal = (action)
print (meal)
tips = input(" type the perentage of tip you want to give ")
if tips.isdigit():
tip = tips
print(tip)
我已经写了,但我不知道如何获得
print(tip)
当有人输入数字时成为百分比。
【问题讨论】:
-
百分比只是
number/100 -
这能回答你的问题吗? How to print a percentage value in python?
标签: python python-3.x