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.
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
- Previous article:20 18 fortune-telling auspicious words _ fortune-telling auspicious words
- Next article:Pingjiang fortune-telling drama
- Related articles
- Fortune-telling of the richest father _ Free fortune-telling of the richest father.
- What is the omen of red-billed fortune telling _ red-billed arithmetic?
- Dreaming of the coffin going up the mountain, windy and rainy halfway, seeking money to solve the dream?
- Did you marry someone whose parents wouldn't let you?
- Ask for a eight-character marriage! Women are six years older than men!
- Fortune-telling bamboo slips pictures _ Fortune-telling bamboo slips pictures daquan
- Why did Dong Fangshuo and others in Han Tian Zi 1 change their names in Han Tian Zi 2?
- Bozhou fortune-telling place
- 2024 Fortune-telling Marriage _ 2024 Fortune-telling
- Zodiac pairing online fortune telling