Home > other >  Python, documents writing and exception handling code
Python, documents writing and exception handling code

Time:12-02


For a great god!!!!! Hope for I have written a good code to write code according to the


Import the random
SecretNum=random. Randint (1, 20)
Print (" this is a number between 1-20 ")
For the number in the range (1, 6) :
Print (" please enter a number: guess ")
Guess=int (input ())
If guess==0:
Break
If guessPrint (" do you think small, the big guess ~ ")
Elif guess> SecretNum:
Print (" you guess, guess a little bit small, please ~ ")
The else:
Break
If (guess==secretNum) :
Print (" congratulations you guess!" )