Fortune Telling Collection - Comprehensive fortune-telling - Write a guessing program in python. Don't use functions. The running results are shown in the figure.

Write a guessing program in python. Don't use functions. The running results are shown in the figure.

Import? at will

What time? 1:

mx? =? int(? Enter (? Please enter the guess range (within 50): 1-? )? )

What time? (mx? & gt? 50? Or? mx? & lt? 1):

mx? =? int(? Enter (? Please enter the guess range (within 50): 1-? )? )

Print (? A random number 1-{0} will be generated below. Format (? mx? )? )

num? =? Random. Random (). randint(? 0,? mx? )

gCount? =? 0

What time? gCount? & lt? 5:

gCount? +=? 1

gNum? =? int(? Enter (? Guess how much? )? )

What if? gNum? ==? Quantity:

Print (? "You guessed it! \n The score this time is {0}. Format (? 2? ? (6? -? gCount)? *? mx? )? )

break

Elif? gNum? & gt? Quantity:

Print (? "Too big ~ ~"? )

Otherwise:

Print (? Too small ~ ~? )

What if? Enter (? "Do it again? Yes/no? " ? ). Next ()? ! =? "Yes": broken