基本上我希望 var2 使瓶子下降该数字,例如当我输入 10 然后 2 我希望瓶子在 2 秒内倒计时,如 10 8 6 4 2 0
var = raw_input(" Enter bottle number ")
var2 = raw_input(" Enter how many bottle taken down ")
bottle_number = int(var)
bottle_down = int(var2)
countdown = ""
while bottle_number > 0:
print bottle_number, "bottles of beer on the wall,", bottle_number, "bottles of beer."
print "Take one down and pass it around,", bottle_number - 1, "bottles of beer on the wall."
print " "
countdown = bottle_number - 1
bottle_number = countdown
if bottle_number == 0:
print """
No more bottles of beer on the wall, no more bottles of beer.
"""