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...

  • 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...

  • 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...

  • two part question - answered in Python 3 2). Decision Structure: A travel agency is checking...

    two part question - answered in Python 3 2). Decision Structure: A travel agency is checking whether its tours are good for customers. It follows the table below to label each tour. (e.g., if a tour has 6 destinations and its price is $600, then it should be labelled as ‘expensive’.) Number of Destinations Price Label <5 <300 or >=300 good or expensive >=5 <500 or >=500 Good or Expensive Write a program that asks the user to enter the...

  • python code Question 2 (60 points) Write a Python clas named Employe that has the fol...

    python code Question 2 (60 points) Write a Python clas named Employe that has the fol Employee that hás the following data attributes: name (the full name of the employee) .id (the ID number of the employee) payRate (the hourly pay rate of the employee) e The Employee class should háve an init number as arguments. These values should be set to the _name an fields. The_payrate data field should initially be set to 0. method that accepts the name...

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
ADVERTISEMENT