Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
thumb_up100%
Write a Python
Randomize the scores.
The final exam will be the last item in the list.
- Calculate the number of exams as the length of the list minus one; assign examCount to len(aGrades)-1.
- Here we will introduce the function sum() to the class.
- The Total Points will be equal to the sum of the list minus the final exam.
- Assign Total Points to sum(aGrades)- aGrades[lastitemIndex].
- Compute the Test Average to be equal to the Total Points divided by the length of the list minus one.
- Assign Test Average to Total Points / examCount
- The final average will be equal to 60% of the test average plus 40% of the Final Exam.
- Assign Final Average to Test Average *.6 + Final Exam * .4
Display the grades list, test average and the final average on separate lines.
Upload the code, and the word doc explaining each line of code and their variables. .
Use of the append method
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 3 steps with 5 images
Knowledge Booster
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
- 53. Write a class with two instance variables, representing an old password and a new password. Write a recursive method that returns the number of places where the two passwords have different characters. The passwords can have different lengths. Write another, nonrecursive method returning whether the two passwords are sufficiently different. The method takes an int parameter indicating the minimum number of differences that qualify the passwords as being sufficiently different. Your program should include a client class to test your class.arrow_forwardImplement a function eligible in Python that returns a list of the names of people that are eligible for vaccination, subject to a minimum age requirement. The function eligible must: accept two arguments: 1. the minimum age for eligibility, a positive integer 2. a multiline string, containing the people waiting to be vaccinated. Each line of the stringcontains a person's name and their age, separated by a single space. return a list of the people who are eligible to be vaccinated, i.e., those whose ages is at least that of the minimum age for eligibility. They should be listed in the order they occur in the input string. Sample: >>> people = 'Sue 25\nAli 45\nSyd 45\nSally 105\nIan 16\nUli 65\nOliver 23\nZoe 95'>>> print(people)Sue 25Ali 45Syd 45Sally 105Ian 16Uli 65Oliver 23Zoe 95arrow_forwardImplement a function alterCase in Python that converts a word to "alterCase". Given a word, using any mix of upper and lower case letters, the function then returns the same word, except that the first letter is upper case, the second is lower case, and then cases of letters alternate throughout the rest of the word. >>> alterCase('apple')'ApPlE'arrow_forward
- Program - Python Make a class.The most important thing is to write a simple class, create TWO different instances, and then be able to do something. For example, create a pizza instance for Suzie, ask her for the toppings from the choices, and store her pizza order. Then create a second pizza instance for Larry, ask for his toppings and store his pizza order. Then print both of their orders back out. You do not need to make your class very complicated. (Shouldn't be the pizza example but something similar)arrow_forwardYour task is to create a function that simulates a vending machine. Given an amount of money (in cents ¢ to make it simpler) and a product Number, the vending machine should output the correct product name and give back the correct amount of change. The coins used for the change are the following: [500, 200, 100, 50, 20, 10] The return value is an object with 2 properties: • product: the product name that the user selected. change: an array of coins (can be empty, must be sorted in descending order). Examples vendingMachine (products, 200, 7) vending Machine (products, 500, 0) → "Enter a valid product number" vendingMachine (products, 90, 1) "Not enough money for this product" → {product: "Crackers", change: [50, 20, 10arrow_forwardmake a C program that implements the "guess my number" game. The computer chooses a random number using the following random generator function srand(time(NULL)); int r = rand() % 100 + 1; that creates a random number between 1 and 100 and puts it in the variable r. (Note that you have to include <time.h>) Then it asks the user to make a guess. Each time the user makes a guess, the program tells the user if the entered number is larger or smaller than its number. The user then keeps guessing till he/she finds the number. If the user doesn't find the number after 10 guesses, a proper game over message will be shown and the actual guess is revealed. If the user makes a correct guess in its allowed 10 guesses, then a proper message will be shown and the number of guesses the user made to get the correct answer is also printed. After each correct guess or game over, the user decides to play again or quit and based on the user choice, the computer will make another guess and…arrow_forward
- Write a Python program with the following specifications: Write a program to simulate a clothing store that sells shirts, pants, and shoes. Define a function for each of these items, and use random number generation to assign a color, type, and size to each item. For example, one run of the shoe function may result in "BROWN BOOTS, 10.5" while another run might give you "RED SNEAKERS, 9.0". Output a list of items, the number of items on this list being either normally or exponentially distributed. Explain, using the context, why you selected the mean of this normal or exponential distribution, and, if it’s normal, the standard deviation.arrow_forwardJava - Car Value (Classes)arrow_forwardIN PYTHON PLEASE.arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education