Question: Please help me solve me the questions down below: c) A stationery shop gives a discount to the university according to the GPA of the

Please help me solve me the questions down below: Please help me solve me the questions down below: c) A stationery

c) A stationery shop gives a discount to the university according to the GPA of the students. The price list of a pencil case from Super Stationery is given below. Write a program that reads in the GPA, and then prints the price. In addition, the program should validate the input. The following table shows the error message that should be printed for each type of input error. The user should be asked to re-enter in case of an error. The following shows an example execution of the program. \begin{tabular}{l} \hline Enter GPA: A- \\ The input is not a number \\ Enter GPA: \\ The input is empty \\ Enter GPA: 2.78 \\ The price is $32 \\ \hline \end{tabular} Submit your solution in q1c.py. [10 marks] d) You are helping the Mathematics Department to work on statistic research. In the games using two 6-face dice, one of them is purposely replaced with faces of 1, 1, 2, 3,4,5 so that 6 will never come out. Assume that you know a normal 6-face die has faces 1,2,3,4,5,6. For curiosity, you wish to know how the outcome, which is the sum of throwing the 2 dice (with one of them is a special die), will be. Write a program that rolls two dice of which one of the dice with the above defect, calculate the outcome, collect the statistics and find out the probability of rolling each possible outcome. Roll 1000 times and then print out the frequency (number of times having each of the outcome values) and also print the corresponding graph. Submit your solution in q1d.py. [10 marks] The program should require no input. The output should look like the example below. Note that due to randomness the exact frequencies will change. The bar chart should be scaled appropriately for analysis

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!