Question
Final project 4) Magic Dates The date June 10, 1960, is special because when it is written in the following format, the month times the
Final project
4) Magic Dates
The date June 10, 1960, is special because when it is written in the following
format, the month times the day equals the year.
Design a program that asks the user to enter a month (in numeric form), a day, and
a two-digit year. The program should then determine whether the month times the
day equals the year. If so, it should display a message saying the date is magic. Otherwise,
it should display a message saying the date is not magic.
5)The colors red, blue, and yellow are known as the 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 red and yellow, you get orange.
When you mix blue and yellow, you get green.
Design a program that prompts the user to enter the names of two primary colors
to mix. If the user enters anything other than red, blue, or yellow, the program
should display an error message. Otherwise, the program should display the
name of the secondary color that results.
6. Book Club Points
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, he or she earns 0 points.
If a customer purchases 1 book, he or she earns 5 points.
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 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.
7. Software Sales
A software company sells a package that retails for $99. Quantity discounts are
given according to the following table:
Quantity Discount
1019 20%
2049 30%
5099 40%
100 or more 50%
Design a program that asks the user to enter the number of packages purchased.
The program should then display the amount of the discount (if any) and the total
amount of the purchase after the discount.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started