|
题目
a = int(raw_input("enter your size:")) #油箱大小
b = float(raw_input("enter your percent:")) #还剩多少油
c = int(raw_input("enter your km_per_liter:")) #一升油能走多少千米
d = a*b*c #还能走的里程
print "you can go another %s km." %(d)
if d >= 200:
print "you can wait for next station."
else:
print "get gas now!"
print "the next station is 200km away."
下面是我自己写的,想请教下还剩多少油该怎么用百分号来表达,有什么地方不规范的?谢谢了!
|
|