Python Programming: An Introduction to Computer Science, 3rd Ed.
Python Programming: An Introduction to Computer Science, 3rd Ed.
3rd Edition
ISBN: 9781590282755
Author: John Zelle
Publisher: Franklin, Beedle & Associates
bartleby

Videos

Expert Solution & Answer
Book Icon
Chapter 5, Problem 3PE

Explanation of Solution

Program:

//Definition of class "main"

def main():

{

    //Declaration of variable lettergradescale

lettergradescale = “FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDDDDDDDDDDCCCCCCCCCCBBBBBBBBBBAAAAAAAAAA”

    //Definition of variable quizgrade

examgrade = int(input(”Please enter the quiz grade on a scale from 0 to 100:”))

    //Defining lettergrade

   ;&#x...

Blurred answer
Students have asked these similar questions
Part 1: Complete the survey. Part 2: Peek-a-boo is a fun game that little kids like to play. To simulate this game on the computer, write a program that will generate a random number between 1 and 4. Then, will print to the screen the animal name associated to that number. The animal names used will be: pig when a 1 is generated cow when a 2 is generated chicken when a 3 is generated horse when a 4 is generated If your program generates a 3, the output will be: chicken The player will then enter a 1 if they would like to play again or anything else to exit the program. If the player enters "1 1 1 0", the output will be: horse chicken cow horse For coding simplicity, follow each output animal by a space, even the last one. Hint: To make testing easier, seed your random number generator with 0.
TASK " Write a program that grades students' exam. The exam has 20 multiple choice questions. Here are the correct answers: 1- A 6- B 11-C 16- D 2- A 7- B 12- C 17- D 3- А 8- В 13-С 18- D 4- А 9- В 14- С 19- D 5- A 10-B 15- C 20- D "A student must correctly answer 15 of the 20 questions to pass the exam. " Write a class named StudentExam that holds the correct answers to the exam in an array. TASK (CONT.) " The class should also have an array that holds the student's answers. The class also should have the following methods: I passed. Returns true if the student passed the exam, or false if the student failed " totalCorrect. Returns the total number of correctly answered questions I totallncorrect. Returns the total number of incorrectly answered questions " questionsMissed. An int array containing the question numbers of the questions that the student missed. 1 On another class, ask the student to enter his name, take his answers and display the results returned from the StudentExam…
The Café Noir Coffee Shop wants some market research on its customers. When a customer places an order, a clerk asks for the customer’s zip code and age. The clerk enters that data as well as the number of items the customer orders. The program operates continuously until the clerk enters a 0 for zip code at the end of the day. When the clerk enters an invalid zip code (more than 5 digits) or an invalid age (defined as less than 10 or more than 110), the program reprompts the clerk continuously. When the clerk enters fewer than 1 or more than 12 items, the program reprompts the clerk two more times. If the clerk enters a high value on the third attempt, the program accepts the high value, but if the clerk enters a negative value onthe third attempt, an error message is displayed and the order is not counted. At the end of the program, display a count of the number of items ordered by customers from the same zip code as the coffee shop (54984), and a count from other zip codes. Also…
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Java random numbers; Author: Bro code;https://www.youtube.com/watch?v=VMZLPl16P5c;License: Standard YouTube License, CC-BY