Knowee
Questions
Features
Study Tools

Sarah, a reviewer for MovieMania Reviews, is updating the database with recent ratings and reviews for the film 'Tenet' directed by Christopher Nolan.Create a program that records and displays the rating and review details for the movie.Input format :The first line of input consists of an integer N, representing the movie rating (1 to 5 stars).The second line consists of a string containing the review text.Output format :The first line of output prints "Recent Review Rating: [N] stars"The second line prints "Review Details: " followed by the review text.Refer to the sample output for formatting specifications.Code constraints :1 ≤ N ≤ 5Sample test cases :Input 1 :4The movie has a complex narrative but is visually stunning.Output 1 :Recent Review Rating: 4 starsReview Details: The movie has a complex narrative but is visually stunning.Input 2 :5An incredible film with mind-blowing sequences and outstanding performances.Output 2 :Recent Review Rating: 5 starsReview Details: An incredible film wit

Question

Sarah, a reviewer for MovieMania Reviews, is updating the database with recent ratings and reviews for the film 'Tenet' directed by Christopher Nolan.Create a program that records and displays the rating and review details for the movie.Input format :The first line of input consists of an integer N, representing the movie rating (1 to 5 stars).The second line consists of a string containing the review text.Output format :The first line of output prints "Recent Review Rating: [N] stars"The second line prints "Review Details: " followed by the review text.Refer to the sample output for formatting specifications.Code constraints :1 ≤ N ≤ 5Sample test cases :Input 1 :4The movie has a complex narrative but is visually stunning.Output 1 :Recent Review Rating: 4 starsReview Details: The movie has a complex narrative but is visually stunning.Input 2 :5An incredible film with mind-blowing sequences and outstanding performances.Output 2 :Recent Review Rating: 5 starsReview Details: An incredible film wit

...expand
🧐 Not the exact question you are looking for?Go ask a question

Solution

Here is a simple Python program that fulfills your requirements:

# Get the rating and review from the user
rating = int(input())
review = input()

# Check if the rating is within the valid range
if 1 <= rating <= 5:
    # Print the rating and review
    print("Recent Review Rating: {} stars".format(rating))
    print("Review Details: {}".format(review))
else:
    print("Invalid rating. Please enter a number between 1 and 5.")

This program first takes the rating and review as input from the user. It then checks if the rating is within the valid range (1 to 5). If the rating is valid, it prints the rating and review in the specified format. If the rating is not valid, it prints an error message.

This problem has been solved

Similar Questions

Randy is attending film school and one of his projects involves researching the ratingsgiven to movies by critics and viewers. He has selected a random sample of movies andhas recorded the average critic score (X1) and the average viewer score (X2) for eachmovie. The scores were obtained from a website that collates movie reviews and ratingssubmitted by critics and viewers. Randy also recorded the genre (X3) of each movie. Thedata are stored in the file AssignmentData.RData in the data frame movies.df.(a) [3 marks] Create a scatter plot of average critic score against average viewer scorefor comedies, with average viewer score along the x-axis. Make sure to give yourplot a proper descriptive title and appropriate labels for the x and y axes. Describethe relationship between these two variables for comedies

You are managing a database for a movie production company. The database includes information about actors, directors, movies, movie cast, and ratings.Write a query for updating the ratings of all movies directed by 'Lankesh' to a new rating of 3 in a database that contains information about actors, directors, movies, movie casts, and ratings.The following table is already created, and the records are inserted into the table.

review report format

Not Boring MoviesX city opened a new cinema, many people would like to go to this cinema. Thecinema also gives out a poster indicating the movies’ ratings and descriptions.Please write a SQL query to output movies with an odd numbered ID and adescription that is not 'boring'. Order the result by rating.For example, table cinema:idmoviedescriptionrating1Wargreat 3D8.92Sciencefiction8.53Irishboring6.24Ice SongFantasy8.65House cardInteresting9.1For the example above, the output should be:idmoviedescriptionrating5House cardInteresting9.11Wargreat 3D8.9Optionsselect movie, description, ratingfrom cinemawhere id % 2 != 1 and description <> 'boring'order by rating asc;select id, movie, descriptionfrom moviewhere rating % 2 = 1 and description <> 'boring'order by rating;select id, movie, description, ratingfrom cinemawhere id % 2 = 1 and description <> 'boring'order by rating desc;select id, movie, description, ratingfrom ratingwhere id % 2 = 1 and description <> 'boring'order by cinema desc;

X city opened a new cinema, many people would like to go to this cinema. Thecinema also gives out a poster indicating the movies’ ratings and descriptions.Please write a SQL query to output movies with an odd numbered ID and adescription that is not 'boring'. Order the result by rating.For example, table cinema:idmoviedescriptionrating1Wargreat 3D8.92Sciencefiction8.53Irishboring6.24Ice SongFantasy8.65House cardInteresting9.1For the example above, the output should be:idmoviedescriptionrating5House cardInteresting9.11Wargreat 3D8.9Optionsselect id, movie, descriptionfrom moviewhere rating % 2 = 1 and description <> 'boring'order by rating;select id, movie, description, ratingfrom cinemawhere id % 2 = 1 and description <> 'boring'order by rating desc;select id, movie, description, ratingfrom ratingwhere id % 2 = 1 and description <> 'boring'order by cinema desc;select movie, description, ratingfrom cinemawhere id % 2 != 1 and description <> 'boring'order by rating asc;

1/1

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.