Question
Python

11. Book Club Points Serendipity Booksellers has a book club that awards points to its customers based on the number of books
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Hopefully all yours doubt will clear if you have left with any doubt please let me know in comment. I will try my best to resolve that.

Here i am posting code and screenshot of program so that you have a clear idea about indentation and output with it.

#enter number of book purchased in this month
books = int(input("enter the number of book purchased this month by you"));
#condition that 0 or 1 book purchased in this month
if books<2:
    point=0;
#condition that 2 or 3 book purchased in this month
elif books<4:
    point =5;
#condition that 4 or 5 book purchased in this month
elif books<6:
    point=15;
#condition that 6 or 7 book purchased in this month
elif books<8:
    point = 30;
#condition that 8 or more book purchased in this month
else:
    point =60;
#prints the point earned in this month
print("number of points earned : ",point);

Screenshot of program with output :-

PC untitled [D:\untitled]-...\day6\ch17.py [untitled] - PyCharm File Edit View Navigate Code Refactor Run Iools VCS Window He

Some other screenshot of output for different values of input :-

Run ch14 x ch17 D:\untitled\venv\Scripts\python.exe D:/untitled/day6/ch17.py enter the number of book purchased this month by

elif books<6 ch17 x ch14 X Run: D:\untitled\venv\Scripts\python.exe D:/untitled/day6/chl7.py enter the number of book purchas

ch17 x ch14 x Run: D:\untitled\venv\Scripts\python.exe D:/untitled/day6/chl7.py enter the number of book purchased this month

Run ch14 x ch17 D:\untitled\venv\Scripts\python.exe D:/untitled/day6/ch17.py enter the number of book purchased this month by

Add a comment
Know the answer?
Add Answer to:
Python 11. Book Club Points Serendipity Booksellers has a book club that awards points to its...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Visual Studio and Visual Basic program b. Serendipity Booksellers has a book club that awards points...

    Visual Studio and Visual Basic program b. 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 no books, he or she earns 0 points. If a customer purchases 1 book, he or she earns 5 points. If a customer purchases 2 book, he or she earns 15 points. If a customer purchases 3 book, he or she earns...

  • Directions: Complete all the three programming assignments below. Please be sure to follow the programming rubric...

    Directions: Complete all the three programming assignments below. Please be sure to follow the programming rubric provided. Turn in three separate “.py" files. Be sure to run your programs before submission. Color Mixer The colors red, blue, and yellow are called primary colors, because they cannot be made by mixing other colors. When you mix two primary colors, you get a secondary color, as shown here: • When you mix red and blue, you get purple. • When you mix...

  • Code in c++ please Q1: Software Sales A software company sells a package that retails for...

    Code in c++ please Q1: Software Sales A software company sells a package that retails for $99. Quantity discounts are given according to the following table: QuantityDiscount 10-19 20-49 50-99 100 or more 20% 30% 40% 50% : Write a program that asks for the number of units sold and computes the total cost of the purchase. Input validation: Make sure the number of units is greater than 0. Q2: Book Club Points Community Booksellers has a book club that...

  • Phython For this program you will be writing a program that will use if-else or if-elif-else...

    Phython For this program you will be writing a program that will use if-else or if-elif-else statements. Read-It-All bookstore has a book sales club where customers can earn reward points that can be used for their next purchase. If a customer purchases 0 books, he/she earns 0 points. If a customer purchases 1-3 books, he/she earns 5 points. If a customer purchases 4-6 books, he/she earns 10 points. If a customer purchases 7-8 books, he/she earns 15 points. If a...

  • Check my work 10 points Supply Club, Inc., sells a variety of paper products, office supplies,...

    Check my work 10 points Supply Club, Inc., sells a variety of paper products, office supplies, and other products used by businesses and individual consumers. During July 2021 it started a loyalty program through which qualifying customers can accumulate points and redeem those points for discounts on future purchases. Redemption of a loyalty point reduces the price of one dollar of future purchases by 20% (equal to 20 cents). Customers do not earn additional loyalty points for purchases on which...

  • Do these codes look right for the following 5 statements. This is using Oracle SQL: Write...

    Do these codes look right for the following 5 statements. This is using Oracle SQL: Write a query that displays the title, ISBN, and wholesale cost of books whose wholesale cost is more than the average of all books. Format the retail price with dollars and cents. Write a query that displays the title and publication date of the oldest book in the BOOKS table. Format the date with the complete name of the month and a comma after the...

  • using the source code at the bottom of this page, use the following instructions to make...

    using the source code at the bottom of this page, use the following instructions to make the appropriate modifications to the source code. Serendipity Booksellers Software Development Project— Part 7: A Problem-Solving Exercise For this chapter’s assignment, you are to add a series of arrays to the program. For the time being, these arrays will be used to hold the data in the inventory database. The functions that allow the user to add, change, and delete books in the store’s...

  • Using the above described algorithm, create a program that: (IN PYTHON) 1.Asks the user which type...

    Using the above described algorithm, create a program that: (IN PYTHON) 1.Asks the user which type of credit card he/she would like to find the checksum for. 2. Based on the user's choice of credit card, asks the user for the n digits of the credit card. [Get the input as a string; it's easier to work with the string, so don't convert to an integer.] 3. Using the user's input of the n digits, finds the last digit of...

  • Part 1: A mobile phone service provider has three different data plans for its customers: Package...

    Part 1: A mobile phone service provider has three different data plans for its customers: Package A: For $39.99 per month 4 gigabytes are provided. Additional data costs $10 per gigabyte. Package B: For $59.99 per month, 8 gigabytes are provided. Additional data costs $5 per gigabyte. Package C: For $69.99 per month, unlimited data is provided. Write a program that calculates a customer's monthly bill. It should ask which package the customer has purchased and how many gigabytes were...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT