Write a python program that allows a user to guess if certain letters are in a word. Theprogram 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 (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 Note: feel free to select any word but be sure to test your program using many different words

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Write a python program that allows a user to guess if certain letters are in a word. Theprogram 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 (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
Note: feel free to select any word but be sure to test your program using many different words
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education