Combine the programs from
Total number of scores
Total number of each letter grade
Percentage of total for each letter grade
Range of scores: lowest and highest
Average score
As before, enter a negative score as a sentinel value to end the data input and display the statistics.
Trending nowThis is a popular solution!
Chapter 4 Solutions
Java: An Introduction to Problem Solving and Programming (7th Edition)
Additional Engineering Textbook Solutions
C Programming Language
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
Introduction to Java Programming and Data Structures, Comprehensive Version (11th Edition)
Concepts of Programming Languages (11th Edition)
Starting Out with Java: From Control Structures through Objects (6th Edition)
Introduction To Programming Using Visual Basic (11th Edition)
- Create a mathematical function which will print out a number in the first index of an array, the square of the number in the second index of an array, the cube of the number in the third index of an array, the square root of the number in the fourth index of an array, and the reciprocal of the number in the fifth index of an array. Run the program for the number 9. Include appropriate column headings and the main heading MATHEMATICAL TABLE. HINT: You will need to use [if-elif] structure. use phytonarrow_forwardLanguage: Pyhon. Processing: Mode 3.54 (Jonathan Feinberg) Please post sketch fle code. Create a sketch named boston pass. This program will tell the user whether they passed a course or not Please read the entire question before starting. Create the following variables using an appropriate name and datatype (do not name them first variable, etc.) First variable: keeps track of the student mark (whole number) Second variable: keeps track of a Boolean value indicating if the student passed Third variable: keeps track of amount the student passed or failed by (whole number) Create the following functions using appropriate names (do not name them first function, etc.) First function: accepts one numeric value, purpose is to see if a student passed the course (50 or more), returns a true or false value. Second function: accepts one numeric value, purpose is to see how much more or less than 50 the student received, returns the amount higher or lower than 50. Third function: accepts one…arrow_forwardCSCI250L Sample Exam 1 Spring 2020-2021 Question1 (50 pts) Write a program that prompts the user to enter the name, the number of children, and the basic salary of an employee. The program will then: Calculate the bonus: bonus = number of children * $25 Calculate the new salary: new salary Apply a tax of 10% and find the paid salary: paid salary = new salary * (1 – tax) %3D salary + bonus The program will then display all the information needed as shown in the sample run below Sample Run: Enter the name of the employee: Jamal Enter the number of children of the employee: 4 Enter the salary of the employee (in $): 1500 The calculated bonus is $100 for 4 children. The new salary is $1600.0 The paid salary for Jamal is $1440.0arrow_forward
- In c++ langauge Household Expense - Create arrays (size 15) that will hold the following information: category and amount). Allow the user to enter the category (ex.Water bill) and the corresponding amount spent on it. After the data entry, display the household categories and its corresponding amount in desceding order (highest amount first) and the total amount spent in a month. This is a sample output belowarrow_forwarda) Find names and surnames of professors who teach a course in the "Biology" program: π(first_name, last_name)(σ(course_name = "Biology")(Course ⨝ Professor)) b) Find the student IDs and names of students who have not taken any exam (from any course): π(student_id, first_name, last_name)(Student - π(student_id)(Exam)) c) Find student IDs of students who have passed every exam from the "Data Science" program: π(student_id)(Student ⨝ (σ(programme = "Data Science")(Course) ⨝ (Student.student_id = Exam.student_id) ⨝ (Exam.grade >= 5))) d) Find the course IDs and names of courses that have been passed by at least two different students: π(course_id, course_name)(Course ⨝ Exam) ÷ ρ(count(students_passed), count(students_passed)(Course ⨝ Exam)) do these solutions fulfil these requirements 2. Use RELATIONAL ALGEBRA to write the following queries:a) Find names and surnames of professors, who teach a course in "Biology" programmeb) Find the student IDs and names of students who have not…arrow_forwardInstructions Copy the main template provided in the breakout room activity onto your IDE Add the implementation for the sum_grades(all_categories) function which returns the sum of the weighted average of grades for all categories Program flow and computation example The following example will show you how we compute the final grade for the course from categories with weights and grades for those categories. This is not what needs to be printed out when the user chooses to Compute the grade. This is simply to demonstrate the math behind the computation. There are 5 categories in this example: PA : 5.0% CA : 15.0% LA : 25.0% QUIZ : 25.0% PROJECT : 25.0% Provided grades: PA grades [100.0, 100.0, 100.0, 100.0, 100.0, 0.0, 95.0] CA grades [100.0, 100.0, 98.0, 95.0, 0.0, 100.0] LA grades [100.0, 100.0, 100.0, 5.0, 0.0, 70.0] Quiz Grades [] Project Grades [] Sum of grades for PA category: 595.00 Sum of grades for CA category: 493.00 Sum of grades for LA category: 375.00 Sum of grades for…arrow_forward
- 2. Test Scores File: test_scores.py Write pseudocode for the main() part of a program that asks the user to enter 4 test scores between 0 and 100, then displays a JCU grade for each score and also the average test score. When you have written the pseudocode for main, implement your solution in Python code and test it with a range of meaningful data. Remember that we've done the JCU grades question before, so copy your function from that practical code file. Sample Output Score: 3 Score: 50.5 Score: 66 Score: 100 Score 3.0, which is N Score 50.5, which is P Score 66.0, which is C Score 100.0, which is HD The average score was 54.875 Enhancements When you have that working... We asked for 4 scores. Have a look at your code... did you use 4 as a numeric literal or a constant?Change 4 to 3... Did you have to change the program in more than one place?If so, then you've missed one of the things we've taught...As a strong guideline: if you need to use the same literal more than once, you…arrow_forwardYou must use at least two different arrays - These are, in effect, parallel arrays: One for Adult Meals One for Child Meals Remember to use a "for" loop for each array You should have totals in $ amount for: Adult Meal costs For example: class1; and class2 Overall totals, combining all categories Percentage for the total categories – the % amount is your choice; for the program outcome shown below, 45% was used Hints and Suggestions: You can set your own catered meal prices – for example, adult meals are $10 You can set how many adults/children meals are sold in each category – for example, 3 adult meals soldarrow_forwardBirthday party At Lili's birthday party, there was a game arranged by Jojo as the host. That game is to distribute Y number of candy to X number of people where all the candy tastes sweet except for one last candy which tasted like rotten nuts. Candy distribution will be sequentially starting from position Z and if past the last position then the distribution of candy continues to the first position. Write down the person in which position will get the last candy. Input FormatThe first line of input is T, which is the number of test cases.The second row and the next number of T rows are X, Y, Z.X is the number of people to whom the candy will be distributed.Y is the number of candy available.Z is the starting position of the person to whom the candy will be distributed. Output FormatA string “Case #N: “ and a number representing the position of the person who got the last candy. Constraints1 ≤ T ≤ 1001 ≤ X, Y ≤ 1031 ≤ Z ≤ X Sample Input 43 4 13 5 24 2 24 5 2 Sample OutputCase #1: 1Case…arrow_forward
- Birthday party At Lili's birthday party, there was a game arranged by Jojo as the host. That game is to distribute Y number of candy to X number of people where all the candy tastes sweet except for one last candy which tasted like rotten nuts. Candy distribution will be sequentially starting from position Z and if past the last position then the distribution of candy continues to the first position. Write down the person in which position will get the last candy. Input FormatThe first line of input is T, which is the number of test cases.The second row and the next number of T rows are X, Y, Z.X is the number of people to whom the candy will be distributed.Y is the number of candy available.Z is the starting position of the person to whom the candy will be distributed. Output FormatA string “Case #N: “ and a number representing the position of the person who got the last candy. Constraints? ≤ ? ≤ ???? ≤ ?, ? ≤ ???? ≤ ? ≤ X Sample Input 43 4 13 5 24 2 24 5 2 Sample OutputCase #1: 1Case…arrow_forwardThe following function has errors. Locate as many errors as you can. void area(int length = 30, int width) { return length * width; }arrow_forwardCreate a flowchart that uses an array that contains valid names for 10 cities in Michigan namely: Acme, Albion, Detroit, Watervliet, Coloma, Saginaw, Richland, Glenn, Midland and Brooklyn. You ask the user to enter a city name; your program then searches the array for that city name. If it is not found, the program should print a message that informs the user the city name is not found in the list of valid cities in Michigan.arrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr