Question: ** We are using PYTHON language. If you can please take screenshots of your complete code or an easy way to read your code. Thank

 ** We are using PYTHON language. If you can please take

screenshots of your complete code or an easy way to read your

code. Thank you! c) Suppose a class takes a multiple-choice test. We'regoing to experiment with alternative scoring mechanisms. For this problem you'll want

** We are using PYTHON language. If you can please take screenshots of your complete code or an easy way to read your code. Thank you!

c) Suppose a class takes a multiple-choice test. We're going to experiment with alternative scoring mechanisms. For this problem you'll want to say from random import (and use the methods randrange and choice, which you can look up in the text or using helpCrandom) Let's say you have these three global constants defined (a complete program might determine these values from reading a file; we're just doing it this way for convenience): NUMBER_OF STUDENTS 200 NUMBER OF_QUESTIONS20 NUMBER-OF-CHOICES-4 # 3 choices is A/B/C, 4 choices is A/B/C/D, 5 is A/B/C/D/E Use the identifiers NUMBER_OF_STUDENTS, NUMBER_OF_QUESTIONS, and NUMBER_OF_CHOICES in your code rather than the hard-coded constants 200, 20, and 4. And of course your code should work correctly when different values are assigned to these identifiers (C.1) Write a function called correct-answers that generates and returns a string of letters representing the correct answers to the test. Of course answers to real tests aren't chosen randomly! We're just doing it this way to produce some test data to use when we score students' answers.) The length of the string should be the number of questions; each character in the string should be chosen randomly from the first n letters of the alphabet (where n is the number of choices). [Use the choice method. Call correct_answers to produce the answers we'll use; assign the result to another global constant called ANSWERS

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!