新的编程,即时学习,这对你来说可能是一个非常简单的问题.
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)
Run Code Online (Sandbox Code Playgroud)
我的问题是,无论生成什么数字,它总是给我相同的"重力是一个婊子.你堕落而死".
我哪里出错了?