import random
print("Let's play the Random Number Game")
guess=random.randint(1,15)
print("\n I've choosed a random Number from 1 to 15", "Try guessing the number")
def strt():
userguess=input("\n Enter the number")
if userguess==guess :
print("wow! you've guessed the correct number in" ,"time")
else:
if userguess>guess:
print("Guess a smaller number")
strt()
else : print("Guess a Larger number")
strt()
strt()
input("Hit Enter to Exit")
我剛剛開始學習Python。這段代碼有什麼問題?我剛開始學習Python。這段代碼有什麼問題?
你告訴我們,它拋出了什麼錯誤? – StoryTeller
你的縮排是關閉的 – inspectorG4dget
[縮進很重要。](http://docs.python.org/2/reference/lexical_analysis.html#indentation) –