subject

Write a Python function LetterGame() that repeatedly asks the user to input a letter. The function is to count the number of vowels the user entered. The function should stop if the user enters a digit (0-9). a) Use a while-loop and in the while loop ask the user to input a letter or to input a digit to stop. b) Check if the user entered a vowel (if command is your friend) c) If the user entered a vowel increase the counter by one d) If the user entered a digit, output the number of letters the user entered and the number and percentage of vowels among them. e) Call the function. Expected output: You entered 10 letters, 2 of which were vowels. The percentage of vowels was 20%.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 23:00
Suppose s, t, and w are strings that have already been created inside main. write a statement or statements, to be added to main, that will determine if the lengths of the three strings are in order by length, smallest to largest. that is, your code should determine if s is strictly shorter than t, and if t is strictly shorter than w. if these conditions hold your code should print (the boolean value) true. if not, your code should print false. (strictly means: no ties) example: if s, t, and w are "cat", "hats", and "skies" your code should print true - their lengths are 3-4-5; but if s, t, and w are "cats" "shirt", and "trust", then print false - their lengths are 4-5-5 enter your code in the box below
Answers: 2
question
Computers and Technology, 23.06.2019 01:20
Me with this program in c++ ! computers represent color by combining sub-colors red, green, and blue (rgb). each sub-color's value can range from 0 to 255. thus (255, 0, 0) is bright red. (130, 0, 130) is a medium purple. (0, 0, 0) is black, (255, 255, 255) is white, and (40, 40, 40) is a dark gray. (130, 50, 130) is a faded purple, due to the (50, 50, 50) gray part. (in other word, equal amounts of red, green, blue yield gray).given values for red, green, and blue, remove the gray part. ex: if the input is 130 50 130, the output is: 80 0 80. thus, find the smallest value, and then subtract it from all three values, thus removing the gray.
Answers: 3
question
Computers and Technology, 23.06.2019 12:40
According to the video what are some tasks petroleum engineers perform check all that apply
Answers: 2
question
Computers and Technology, 23.06.2019 15:00
Visually impaired individuals generally rely on the for navigation. thus, designers need to ensure that mouse-specific inputs, such as pointing, clicking, and hovering, can be done without a mouse.
Answers: 1
You know the right answer?
Write a Python function LetterGame() that repeatedly asks the user to input a letter. The function i...
Questions
question
Health, 21.07.2020 20:01
question
Health, 21.07.2020 20:01
question
Mathematics, 21.07.2020 20:01
Questions on the website: 13722360