Question: Using Python for code Briefly describe how both the and & or operators work. Write a program that uses nested loops to collect data and
Using Python for code Briefly describe how both the and & or operators work. Write a program that uses nested loops to collect data and calculate the average rainfall over a period of years. The program should first ask for the number of years. The outer loop will iterate once for each year. The inner loop will iterate twelve times, once for each month. Each iteration of the inner loop will ask the user for the inches of rainfall for that month. After all iterations, the program should display the number of months, the total inches of rainfall, and the average rainfall per month for the entire period.
Part :
The CSU Global Bookstore has a book club that awards points to its students based on the number of books purchased each month. The points are awarded as follows:
If a customer purchases books, they earn points.
If a customer purchases books, they earn points.
If a customer purchases books, they earn points.
If a customer purchases books, they earn points.
If a customer purchases or more books, they earn points.
Write a program that asks the user to enter the number of books that they have purchased this month and then display the number of points awarded.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
