Answer to Question #51696 in Python for seid

Question #51696
Question 1

Write a program, question1.py, to print the following on the screen:
What percent are you aiming for in this Python module?
and then read in an answer string on the next line and afterwards print:
Good luck with achieving your <answer>%!

Example:
-------------
What percent are you aiming for in this Python module?
65
Good luck with achieving your 65%!


Question 2

Write a program, question2.py, to print the following on the screen:
What percent are you aiming for in this Python module?
and then read in an answer string on the next line. It must then calculate what exam percent is required to reach this target if the user gets 90% for the Python assignments. The final mark target is calculated as 0.7*examPercent + 0.3*assignmentPercent (see Course Outline). Your last output line must be:
If you get 90% for the assignments then you will need <whatever>% for the exam

Example:
-------------
What percent are you aiming for in this Python module?
62
If you get 90% for the assignments then you will need 50% for the exam

(Example explained: because 90*0.3 = 27; 62 – 27 = 35; 35/70 = 50%).

Question 3

Write a program, question3.py, that extends question 2.py to handle the requirement that the exam percent in a module must be a minimum of 40%, otherwise the module is failed.

Example:
-------------
What percent are you aiming for in this Python module?
50
If you get 90% for the assignments then you will need 40% for the exam

(Example explained: 90*0.3 = 27; 50 – 27 = 23; 23/70 = 33%, but you need at least 40%).


Question 4

Write a program, question4.py, to read in all the marks for an exam (these will all be integers and each must be on a new line) and print out the class average, the highest mark and the lowest mark. Your program must be able to handle any number of marks i.e. any size of class – a negative integer will be the last number input (this is not a mark, it is just to let your program know there is no more input). If there are no marks entered (just a negative) then average, minimum and maximum are all N/A (meaning not applicable). Give the average as an integer, truncating any fractional part (e.g. 66.99 given as 66). Your program must start by printing out “Give all the marks, followed by a negative number”, and end by printing average, minimum and maximum exactly as in the example:

Example:
-------------
Give all the marks, followed by a negative number
65
30
45
60
50
-1
class average was 50, lowest mark 30, highest mark 65
0
Expert's answer

Answer in progress...

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS