Serendipity Booksellers has a book club that awards points to its customers based on the number of books purchased every month, The points are awarded as follows 1.If a customer purchases 0 books, he or she earns points 0 If a customer purchases 1 books, he or she earns points 5 If a customer purchases 2 books, he or she earns 15 points If a customer purchases 3 books, he or she earns 30 points If a customer purchases 4 or more books he or she earns 60 points Design a program using pseudocode that asks the user to enter the number of books that he or she has purchased this month and displays the number of points awarded . Here are some necessary parameters to follow to help solve the problem. Please write line numbers before each line of the algorithm, include blank numbered lines between modules and write comments 1.Create a main module. It should declare one local variable and call two other modules 2. Create a module to get input from the software user 3.Create a module to print out the answer. **example of desired format is attatched
Serendipity Booksellers has a book club that awards points to its customers based on the number of books purchased every month, The points are awarded as follows
1.If a customer purchases 0 books, he or she earns points 0
If a customer purchases 1 books, he or she earns points 5
If a customer purchases 2 books, he or she earns 15 points
If a customer purchases 3 books, he or she earns 30 points
If a customer purchases 4 or more books he or she earns 60 points
Design a program using pseudocode that asks the user to enter the number of books that he or she has purchased this month and displays the number of points awarded .
Here are some necessary parameters to follow to help solve the problem. Please write line numbers before each line of the
1.Create a main module. It should declare one local variable and call two other modules
2. Create a module to get input from the software user
3.Create a module to print out the answer.
**example of desired format is attatched
![Get live help whenever you need from online tutors! Try bartleby tutor today >
Pseudocode:
1. //function to get input and return the user input
2. getinput():
3. Input mass
4.
return mass
5. End getinput
6. //function to calculate weight and return the weight
7. calculateWeight(Real mass, constant, weight):
8. weight = mass ' constant
9. return weight
10. End calculateWeight
11. //function to display the result
showResult(weight):
13. Output "Weight is:", weight
12.
14. End showResult
15. //main function
16. main()
Declare Real mass, weight,constant
17.
18. Assign constant = 9.8
Assign mass = getinput()
20. If mass > 1000:
19.
21.
Output "Object is too heavy"
22.
Else If mass < 10:
23.
Output "Object is too light"
24.
Else:
25.
weight = calculateWeight(mass,constant,weight)
26.
End If
27. showResult(weight)
28. End main
Explore similar questions](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F1165b9fb-2513-46db-a7fe-856f75a26240%2F8a1dac3d-d967-4aee-af6d-bdb9faba83a6%2F233uos3_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
As per the given problem, we have to design a pseudocode that displays the number of points earned which is calculated on the basis of number of books purchased.
If Books Purchased == 0, points earned is 0,
If Books Purchased == 1 points earned is 5,
If Books Purchased == 2, points earned is 15,
If Books Purchased == 3, points earned is 30,
If Books Purchased >= 4, points earned is 60,
Modules required :
1. Main module.
2. Module to take input from user
3. Module to print the answer.
The required pseudo-code is implemented below as required.
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)