Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Design a program for the hollywood movie rating guide, in which users continuosl

ID: 3640878 • Letter: D

Question

Design a program for the hollywood movie rating guide, in which users continuosly enter a value from 0 to 4 that indicates the number of stars they are awarding to the guide's featured movie of the week. the program executes continuosly until a user enters a negative number to quit. if a user enters a star value that does not fall in the correct range, reprompt the user continuosly until correct value is entered. at end of program, display the average star rating for the movie.
(There is one 'user'. They have collected multiple ratings from multiple viewers. They are now entering them.)

Explanation / Answer

#Pseudocode for Hollywood Movie Rating Guide
-----------------------------------------
set total_stars to 0
set total_ratings to 0

while input_rating < 0
{

ask the user for the input_rating
if input_rating >= 0 and input_rating <= 4
{
add input_rating to total_stars
increase total_ratings by 1
}
else
{
tell user that they have input an invalid rating
}
}

set average_rating equal to total_stars divided by total_ratings
print average_rating to screen
-----------------------------------------

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote