编程新手,我正在学习,这对你们来说可能是一个非常简单的问题。
import random
def run_stair_yes():
print "\nRunning in stairs is very dangerous!"
print "Statistique shows that you have 70% chance of falling"
print "\nroll the dice!"
for i in xrange(1):
print random.randint(1, 100)
if i <= 70 :
print "\nWell, gravity is a bitch. You fell and die."
elif i >= 71 :
athlethic()
else:
print "im boned!"
exit(0)
我的问题是,无论生成什么数字,它总是给我同样的“重力是个婊子。你摔倒了就死了”。
我哪里错了?