Write a python program that allows a user to guess if certain letters are in a word. The program should do the following: 1. Ask for user to input a letter to guess 2. Check if the input is valid. Valid input is a single letter or ‘quit’, both case insensitive 3. Output how many times that letter appears in the word  4. The program should continue functionality 1-3 infinitely until the user enters ‘quit’. When the user enters ‘quit’, the word should be displayed, and the program should end.   Example:  Enter a letter to guess: A there are 1 a’s Enter a letter to guess: 2 Invalid input Enter a letter to guess: e there are 0 e’s Enter a letter to guess: quit The word was ‘wombat’ Goodbye

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter4: Making Decisions
Section: Chapter Questions
Problem 7E: Write a program named GuessingGame that generates a random number between 1 and 10. (In other words,...
icon
Related questions
Question
Write a python program that allows a user to guess if certain letters are in a word. The program should do the following:
1. Ask for user to input a letter to guess
2. Check if the input is valid. Valid input is a single letter or ‘quit’, both case insensitive
3. Output how many times that letter appears in the word 
4. The program should continue functionality 1-3 infinitely until the user enters ‘quit’. When
the user enters ‘quit’, the word should be displayed, and the program should end.
 
Example: 
Enter a letter to guess: A
there are 1 a’s
Enter a letter to guess: 2
Invalid input
Enter a letter to guess: e
there are 0 e’s
Enter a letter to guess: quit
The word was ‘wombat’
Goodbye
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,