pmckain
17.03.2020 •
Computers and Technology
Guess the word game part 1 for python
Solved
Show answers
More tips
- H Health and Medicine 10 Tips for Avoiding Vitamin Deficiency...
- F Food and Cooking How to Properly Cook Buckwheat?...
- F Food and Cooking How Many Grams Are In a Tablespoon?...
- L Leisure and Entertainment Carving: History and Techniques for Creating Vegetable and Fruit Decorations...
- P Photography and Videography How to Choose the Perfect Photo Paper for Your Images?...
- H Health and Medicine What vaccines do children need?...
- H Health and Medicine Reasons for the Appearance of Warts: Everything You Need to Know...
- A Art and Culture How to Learn Screaming: Step-by-Step Guide for Beginners...
- H Health and Medicine Contraceptive Pills After 35: The Importance Of Choosing The Right Medication...
- C Computers and Internet How to Choose a Monitor?...
Answers on questions: Computers and Technology
- M Mathematics The question is in the picture...
- M Mathematics Simplify this plzI had the wrong question I m sorry ...
- M Mathematics Natalie lost her job through no fault of her own. She had worked ther for two years and the last year she earned $27,500. She has applied for unemployment insurance. What will her...
- M Mathematics Multiple Choice You start a new job at a pay rate of $6 per hour. You expect a raise of 4% each year. After 6 raises, how much will you be earning per hour? (B) $7.02 © $7.57 + (E)...
- H History PART B: Which of the following quotes best supports the answer to Part A? A the widow moved her family to Indiana B Many other black citizens were packing up and leaving C losing labor...
- E English Explore: Conduct research to find out why the Mississippi steamboats were essential to the economy of late-nineteenth-century America...
- C Chemistry When a piece of metal was heated in a flame and then dropped into a foam cup calorimeter filled with 200 mL of water at 22.5°C, the temperature of the water rose to 38.7°C. How much...
- M Mathematics Rehan is solving a linear equation 2x-6=18, in the first step he gets the equation x-3=9 What did he do in the first step?...
- M Mathematics Please helppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp Melissa orders business cards to promote her new website. She previews...
- E English Plz help! (This is in English because of propaganda) How did the Nazis use propaganda during World War II?...
Ответ:
import random
w1 = ('Hen', 'Cat', 'Elephant', 'Lion')
w2 = random.choice(w1)
correct1 = w2
clue1 = w2[0] + w2[(len(w2)-1):(len(w2))]
guessletter = ''
w2_guess = ''
store1_letter = ''
cnt= 0
limit1 = 5
print('Welcome to "The Game of Word Guessing!"')
print('You will be getting five attempts to guess letter in the word')
print('Let\'s start!')
print('\n')
while cnt < limit1:
guessletter = input('Guess a letter: ')
if guessletter in w2:
print('yes!')
store1_letter += guessletter
cnt += 1
if guessletter not in w1:
print('no!')
cnt += 1
if cnt == 2:
print('\n')
clue1 = input('Would you be happy with a clue?')
if clue1 == 'y':
print('\n')
print('CLUE: The 1st and last letter of the word are: ', clue)
if clue1 == 'n':
print('You\'re a braveheart!')
print('\n')
print('Now you need to guess. And till now you guessed',len(store1_letter),'letters accurately.')
print('And the letters are: ', store1_letter)
guessword = input('Please guess the whole word now: ')
while guessword:
if guessword.lower() == correct1:
print('Congratulations!')
break
elif guessword.lower() != correct1:
print('You are unlucky, the correct answer was,', w2)
break
print('\n')
input('Click on any letter to exit the Game')
Explanation:
In the above program, the player is first allowed to guess the letter, and then he/she is asked to guess the whole word. The number of attempts is limited to 5. However, the correct word can be guessed only one time. And you need to click any letter to exit the game.
Ответ:
46
Step-by-step explanation:
add it and multiply it I'D SHOWED MY WORK