Ask Question
15 July, 14:21

viewRatings (string, int) Takes a username and a minimum rating value. It prints all the books that the user has rated with a value greater than or equal to the minimum rating value. The function does not return anything.

+1
Answers (1)
  1. 15 July, 15:11
    0
    def ViewRatings (str, rating):

    for book in books:

    if r > = rating:

    print (book)

    ViewRatings ("emma", 3)

    Explanation:

    * The code is in Python.

    Since the are missing parts in your question. I am assuming there is a books list and there is a rating, r for each book.

    - Create a function called ViewRatings that takes two parameters

    - Initialize a for loop that iterates through each book in the books list

    - For each book, check its rating with given rating. If the rating of the book is greater than or equal to given rating, print the book

    - Call the function
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “viewRatings (string, int) Takes a username and a minimum rating value. It prints all the books that the user has rated with a value greater ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers