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 the 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 (see example below). 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.

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 the 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 (see example below).
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
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

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,