Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Programming language: Python Write a function, grade_histogram(t,mu,sigma,n), which uses the turtle module to make a histogram for quiz score data for n = 100 students.

Programming language: Python

Write a function, grade_histogram(t,mu,sigma,n), which uses the turtle module to make a histogram for quiz score data for n = 100 students. First, create the data using gauss(mu,sigma), from the random module. mu is the average and sigma is the standard deviation of the scores and is a measure of the spread of the data scores. When the quiz data is generated, check to make sure that each quiz score is between 0 and 100, inclusive. Put the data into a list. Take the data you generated with the specified mean and standard deviation & make a histogram of the number of As, Bs, Cs, Ds and Fs, according to the following rubric:

A: 95 <= score <= 100

B: 85 <= score < 95

C: 75 <= score < 85

D: 65 <= score < 75

F: score < 65

Use appropriate helper functions to make your code easy to write and easy to read.

Scale the histogram height so the maximum height is 300 turtle steps. Your code should have output like the sample shown below which uses 100 students with mu = 80 and sigma = 10, and which includes the labels shown on top of each of the histogram bars. Note that the number of As, Bs, Cs, Ds and Es must equal to n.

grade_histogram(alex,80,10,100)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke

4th Edition

0136086535, 9780136086536

More Books

Students also viewed these Databases questions

Question

8. Design office space to facilitate interaction between employees.

Answered: 1 week ago