Serendipity Booksellers has a book club that awards points to its customers based on

the number of books purchased each month. The points are awarded as follows:

-If a customer purchases 0 books, 0 points are earned.

-If a customer purchases 1 book, 5 points are earned.

-If a customer purchases 2 books, 15 points are earned.

-If a customer purchases 3 books, 30 points are earned.

-If a customer purchases 4 or more books, 60 points are earned.

Write a program that asks the user to enter the number of books that he or she has

purchased this month and then display the number of points awarded

Answers

Answer 1

Answer:

n_books = int(input('Kindly enter the number of you've purchased this month'))

if n_books = 0 :

points_earned = 0

elif n_books = 1 :

points_earned = 5

elif n_books = 2 :

points_earned = 15

elif n_books = 3 :

points_earned = 30

elif n_books >= 4 :

points_earned = 60

Print('Thanks for your patronage, you now have', points_earned, 'points')

Explanation:

Using python :

n_books prompts the user to enter an integer value for the number of books purchased for the month

The integer is passed to a conditional if statement in other to find the appropriate number of points the user has earned,

After the points have been found then, the number of points is displayed using the print statement.


Related Questions

Which is the correct arrangement for the path of a person seeking training as an engineer?
A. Interview with accomplished engineers, attend a two-year college, and proceed to a specialty program
B. Receive a two-year specialized degree from an engineering school, and then work as an apprentice for five years
C. Complete a bachelor of science degree, master of technology degree, and then a PhD in whichever specialized area the person wants to pursue.
D. Complete a four-year bachelor's degree in a specialized field, work with a Professional Engineer, and take a Professional Engineering examination to earn a license

Answers

Answer:

b

Explanation:

Answer:

b

Explanation:

 

Other Questions
Suppose you were digging a well into saturated sediments. Why is the sediments permeability an important factor in deciding where to put your well? Multiplication And Divisin Fact Families ,Will Mark Brainliest NEED HELPP CORRECTT ANSWERS AND WILL GIVE THANKS AND MARK BRAINLIST ONLY FOR CORRECT ANSWER Substance X has a specific heat capacity that is twice as large as Substance Y. If both samples ended up at the same change in temperature from the same amount of energy added, what is the relationship between the masses of the two samples? Explain. enun en un cuadro comparativo define lo qie es y no de ladivision de trabajo Need help asapWill mark you brainlist Help plz I need answe Numbers, Using the Right Word, Capitalization, Combining Sentences ( what are the 6 errors in this question). A Queen bee can live for 5 years. She can lie millions of eggs. A gas has a volume of 250.0 liters at 17.0 C and 3.00 atm of pressure. what volume must the gas be increased for the gas to be at STP conditions? x/7-1=1-2/3yHELPPPPP Briefly explain how one person event or development from 1775 to 1900 could be used to support the pyramid of capitalism systems interpretation Are themes universal or do they only apply to specific people?? -An internatinal call costs $9.35 for 32 minutes. What is the cost per minute? ill give brainliest for help with algebra. random answers will be reported.1. the sum of three consecutive integers is 114. what are the integers?2. the sum of two consecutive ODD integers is 36. What are the integers? Please help!!! 10 points for it!! Write a program that prompts the user to enter a fraction in the following format (x/y). You may assume that the user will input numbers and a slash, but your program should deal with spaces. Use String methods to parse out the numerator and denominator (e.g. indexOf(), trim(), substring() etc.) Once you have the numerator and denominator, your program will determine whether the number is a proper fraction or an improper fraction. If it is a proper fraction, display the number. If not, reduce it to a mixed fraction or to an integer (see sample output below). Which of these is an example of someone using the process of synthesis?A. A scientist attempting to determine why sprinkling salt on an icy road makes the ice meltsB. a parent deciding what kind of punishment to give to a disobedient childC.a judge deciding what penalty to give a convicted criminalD. a historian writing a book about a series of different disasters that all hit the same city Do you know this please answer if y'all can answe all 3 i ly why are independent candidates at a disadvantage in relation to major party candidates during elections?