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
write a program in python Write a program that will allow a student to enter their name and then ask them to solve 10 mathematical equations. The program should display two random numbers that are to be added, such as: 247 + 129 The program should allow the student to enter the answer. The program should then display whether their answer was right or wrong, and accumulate the right values. After the 10 questions are asked, calculate the average that was correct. Then display the student name, the number correct, and the average correct in both decimal and percentage format. In addition to any system functions you may use, you might consider the following functions: A function that allows the student to enter their name. A function that gets two random numbers, anywhere from 1 to 500. A function that displays the equation and asks the user to enter their answer. A function that checks to see if the answer is correct and accumulates the number correct. A function that calculates the…
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