Uploaded by P.D D.P

Culminating Activity - ICS - FINAL-1-1

advertisement
Mr. Diakoloukas
Culminating Activity – Python Problem Set
Students will complete the following problem(s). Students MUST use a LIST, FUNCTION, TRY AND
EXCEPT when possible. In each case, these are to be used. Specifically, TRY AND EXCEPT and FUNCTIONS
should be used. In cases where the user is inputting integers, it is best to store that data in a list. Make
sure you have proper header and code comments! This is part of your grade.
Question 1:
Students will write a program that uses a loop to enter each mark into a list of integers. When the user
enters -1, the loop stops. It then calls a function that accepts a list of integers and returns the average
of all the marks entered.
Question 2:
Students will write a program that will take user input of their salary, the program will calculate the net
salary on the following basis (must account for income tax, how much will they get after taxes
deducted? And how much for each tax?)
Salary
Federal Tax
Provincial tax
1-10000
0%
0%
10001-45000
15%
5%
45001-90000
20.5%
9%
90001-120000 26%
12%
120001+
13%
29%
This is important. The salary entered must be taxed according to the above brackets. This was
previously posted incorrectly. So here is the explanation:
For the FEDERAL TAXES, first 10,000 it is taxed at 0%. 10001 to 45000 at 15% and so on.. This applies
to both Federal and Provincial taxes. In both cases, they are taxed that way.
Question #3:
Students will write a program that uses functions, loops, etc. That will ask the user for the number of
courses they are taking. The user will input the total grades, the program will then output the following:
1. Mean
2. Median
3. Mode
The program will also output the LETTER GRADE value of the average. If the average is 75%, the Letter
Grade is B.
Here are the Letter Grades Breakdown:
80-100% A
Mr. Diakoloukas
70-79% B
60-69% C
50-59% D
1-49%
F
** MAKE SURE TO USE TRY AND EXCEPT IN ALL CASES! **
Download