Question

In: Computer Science

Write a program In python of Jupiter notebook (using loops) that prompts the user to enter...

Write a program In python of Jupiter notebook (using loops) that prompts the user to enter his/her favorite English saying, then counts the number of vowels in that (note that the user may type the saying using any combination of upper or lower case letters).


Example:
Enter your favorite English saying: Actions speak LOUDER than words.
Number of wovels: 10

Solutions

Expert Solution

Python code:

#initializing vowels
vowels="aeiouAEIOU"
#asking for favorite English saying
saying=input("Enter your favorite English saying: ")
#initializing count as 0
count=0
#looping each charcter in saying
for i in saying:
    #checking if it is a vowel
    if(i in vowels):
        #incrementing count
        count+=1
#printing Number of vovels
print("Number of vovels:",count)


Screenshot:


Input and Output:


Related Solutions

In PYTHON OF JUPIDER NOTEBOOK Write a program that prompts the user to enter his/her nationality...
In PYTHON OF JUPIDER NOTEBOOK Write a program that prompts the user to enter his/her nationality (French/french, Italian/italian, or Spanish/spanish). Then ask his/her name using a prompt message in his/her own language (use Google Translate if you need). After getting the name, again greet him/her using a greeting message in his/her own language. If the user is not from any of the above nationalities just use English to prompt for name and to greet the user. Example 1: Nationality? french...
Write a Python program using functions and mainline logic which prompts the user to enter a...
Write a Python program using functions and mainline logic which prompts the user to enter a number, then generates that number of random integers and stores them in a file. It should then display the following data to back to the user: The list of integers The lowest number in the list The highest number in the list The total sum of all the numbers in the list The average number in the list At a minimum, the numbers should...
Python Jupiter Notebook Write a program that keeps getting a set of numbers from user until...
Python Jupiter Notebook Write a program that keeps getting a set of numbers from user until the user enters "done". Then shows the count, total, and average of the entered numbers. Example: Enter a number: 55 Enter a number: 90 Enter a number: 12 Enter a number: done You entered 3 numbers, total is 157, average is 52.33333
Programming Python Jupiter notebook Write a Python program that gets a numeric grade (on a scale...
Programming Python Jupiter notebook Write a Python program that gets a numeric grade (on a scale of 0-100) from the user and convert it to a letter grade based on the following table. The program should be written so that if the user entered either a non-numeric input or a numeric input out of the 0-100 range, it asks him/her to enter a numeric input in the correct range, instead of returning an error. Example: Enter your score: 78 Letter...
Write a function posnum that prompts the user to enter a positive number and loops to...
Write a function posnum that prompts the user to enter a positive number and loops to error-check. It returns the square root of the positive number entered by the user. It calls a subfunction in the loop to print an error message. The subfunction has a persistent variable to count the number of times an error has occurred. Here is an example of calling the function: >> squarerootvalue = posnum Enter a positive number: -5 Error #1: Follow instructions! Does...
Write a PYTHON program that prompts the user to enter the account’s present value, yearly interest...
Write a PYTHON program that prompts the user to enter the account’s present value, yearly interest rate, and the number of years that the money will be left in the account. The program should pass these values to a function that returns the future value of the account, after the specified number of months. The program should display the accounts’ future value
python.Write a python program that prompts the user to enter the year and first day of...
python.Write a python program that prompts the user to enter the year and first day of the year, and displays the first day of each month in the year. For example, if the user entered the year 2020 and 3 for Wednesday, January 1, 2020, your program should display the following output: January 1, 2020 is Wednesday February 1, 2020 is Saturday …… December 1, 2020 is Tuesday
Write a program in PYTHON, using a while loop, that asks the user to enter the...
Write a program in PYTHON, using a while loop, that asks the user to enter the amount that they have budgeted for the month. The program should then prompt the user to enter their expenses for the month. The program should keep a running total. Once the user has finished entering their expenses the program should then display if the user is over or under budget. The output should display the monthly budget, the total expenses and whether the user...
(PYTHON) Write aprogram that prompts user to enter three sides of a triangle....
(PYTHON) Write a program that prompts user to enter three sides of a triangle. The program should determine if the three sides can form a triangle. If the three sides can form a triangle, then determine the type of the triangle.There are three types of triangles: Equilateral triangle (all 3 sides are equal) Isosceles triangle (two sides are equal, the third side is of a different length) Scalene triangle (all 3 sides are of different lengths)   The program should...
Write a program that prompts the user to enter a positive integer and then computes the...
Write a program that prompts the user to enter a positive integer and then computes the equivalent binary number and outputs it. The program should consist of 3 files. dec2bin.c that has function dec2bin() implementation to return char array corresponding to binary number. dec2bin.h header file that has function prototype for dec2bin() function dec2binconv.c file with main function that calls dec2bin and print results. This is what i have so far. Im doing this in unix. All the files compiled...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT