
you will take the output from the first task and write an
[1, 4, 3, 3, 2, 1, 3, 0, 3, 2, 2]
The output would be 2.18
output from 1st task is in photo
Identify which pattern or patterns could best be applied to the solution of the second task. State clearly the name of the pattern and the pattern number, for example “List generation Pattern 2.2
Pattern 4.1 Formula
Pattern 4.2 Case analysis (two cases))
Pattern 4.3 Case analysis (multiple cases)
Pattern 4.4 Case analysis (nested cases)
Pattern 4.5 Sequence generation
Pattern 2.2 List generation
Pattern 2.3 List filtering
Pattern 2.4 List transformation
Pattern 2.5 Reduction: counting
Pattern 2.6 Reduction: aggregation
Pattern 2.7 Reduction: find value
Pattern 2.8 Reduction: find best value
Pattern 2.9 Reduction: version 3 find position of first best value
![choice = 'Y'
while choice != 'N':
num_of_grades = int(input(
"Enter number of grades you want to enter: ")) # asking user number of grades including
# academic and non-academic
grades = [] # list to store entered grades
grades_numeric_value = [] # list to store the numeric value of grades
#looping and storing the input and its numeric value
for i in range(num_of_grades):
grades. append(input("Grade: "))
# different cases of Grades
if grades[i] == 'A':
grades_numeric_value.append(4)
elif grades[i] == 'B':
grades_numeric_value.append(3)
elif grades[i] == 'C':
grades_numeric_value.append(2)
elif grades[i] == 'D':
grades_numeric_value.append(1)
elif grades[i] == 'F':
grades_numeric_value.append(0)
#we have not written case for W grade because it is non-academic grade
#appending 'C' as according to id, first digit is '1' which is odd so, as per question add 'C'
grades. append('C')
grades_numeric_value.append(2) # adding numeric value
# calculating total grade point using sum function
total_grade_point = sum(grades_numeric_value)
gpa = total_grade_point / len(grades_numeric_value) # calculating GPA by dividing total with num of
grades
print("Grades: ", grades) # displaying all grades
print("Grade points: ", grades_numeric_value) # displaying grade point of academic courses
print("Your total GPA is : {:.2f}".format(gpa)) # printing GPA
print("Do you want to calculate another GPA? (Y = yes / N = no)") # asking user if he wants to calculate
again
choice = input() # storing input
print("Thank You!") # greeting](https://content.bartleby.com/qna-images/question/43441e92-b7c8-4599-b90d-2666dd4e233a/3474f81e-c721-4f37-8ad0-9e28da4d5dfa/5lq8a5u_thumbnail.png)

Step by stepSolved in 2 steps with 4 images

experts need to read the question correctly you are not been asked for code or an
Identify which pattern or patterns could best be applied to the solution of the second task. State clearly the name of the pattern and the pattern number, for example “List generation Pattern 2.2
Pattern 4.1 Formula
Pattern 4.2 Case analysis (two cases))
Pattern 4.3 Case analysis (multiple cases)
Pattern 4.4 Case analysis (nested cases)
Pattern 4.5 Sequence generation
Pattern 2.2 List generation
Pattern 2.3 List filtering
Pattern 2.4 List transformation
Pattern 2.5 Reduction: counting
Pattern 2.6 Reduction: aggregation
Pattern 2.7 Reduction: find value
Pattern 2.8 Reduction: find best value
Pattern 2.9 Reduction: version 3 find position of first best value
please read correctly before you answer intead of wasting peoples questions
experts need to read the question correctly you are not been asked for code or an
Identify which pattern or patterns could best be applied to the solution of the second task. State clearly the name of the pattern and the pattern number, for example “List generation Pattern 2.2
Pattern 4.1 Formula
Pattern 4.2 Case analysis (two cases))
Pattern 4.3 Case analysis (multiple cases)
Pattern 4.4 Case analysis (nested cases)
Pattern 4.5 Sequence generation
Pattern 2.2 List generation
Pattern 2.3 List filtering
Pattern 2.4 List transformation
Pattern 2.5 Reduction: counting
Pattern 2.6 Reduction: aggregation
Pattern 2.7 Reduction: find value
Pattern 2.8 Reduction: find best value
Pattern 2.9 Reduction: version 3 find position of first best value
please read correctly before you answer intead of wasting peoples questions
- In this assignment, you are going to complete a program that compute gross and net payment based on hourly wage, hours worked and a couple withholdings. Implementation Details: Make sure the outputs line up on the right-hand side. Each column in the output lines up vertically. ● The program prompt the user to enter the number of hours per week. The gross pay, net pay and the deduction is computed based on the total the number of hours worked. The deductions includes Federal tax, state tax, social security, medicare. Use declare named constants and initialize them to the values below: FEDERAL_TAX_PERCENT: 10.0 STATE_TAX_PERCENT: 3 SS_PERCENT: 6.2 MEDICARE PERCENT: 1.45 PAY_PER_HOUR: 11.25 Create a class called PayCalc to compute a person's gross and net weekly pay based on their hourly wage, hours worked, and several withholdings. All statements should be defined in the main method of the class (except for declarations of constants). ● Once your program is implemented, compile and run…arrow_forwardTranscribed Image Text Listed below are number in the table. If the user want to search for 65, what will be the display of the program? Create a program using 5.2. Sequential Search 17 20 65 31 44 54 55 65 77 93arrow_forwardJava code for the following question. Sample output is also given in the 2nd picture do according to the samplearrow_forward
- A thermometer is removed from a room where the temperature is 70° F and is taken outside, where the air temperature is 10° F. After one-half minute the thermometer reads 57° F. What is the reading of the thermometer at t = 1 min? Assume that the rate of change of temperature in time is proportional to the difference between the thermometer's temperature and the air temperature. Type your answer in °F in the space provided below. Round your answer to two decimal places.arrow_forwardYour team was asked to program a self-driving car that reaches its destination with minimum travel time. Write an algorithm for this car to choose from two possible road trips. You will calculate the travel time of each trip based on the car current speed and the distance to the target destination. Assume that both distances and car speed are givenarrow_forwardI need help with this python computer science DEEP BREADTH SEARCH question. I have the layout of the code but I need help filling in the parts that say "pass" and I want you to take a picture of your output and make sure it matches the sample run below. Find a path (not the best path, but just any path) from A to Z. You see that the green path is not the shortest but it does let us navigate from start to finish. (The picture below) First, we need to know A and Z, our starting and ending points. We'll pass these into our function. I'm going to use a dictionary to represent this graph. Each node (vertex, circle) will have a name, in this case "A" and "Z" were the names of the nodes, but in the generated maps I'm going to use "Node 1", "Node 2", "Node 3", etc. Here is an example web_map web_map = { 'Node 1': ['Node 3', 'Node 2'], 'Node 2': ['Node 1', 'Node 4'], 'Node 3': ['Node 1'], 'Node 4': ['Node 2'] } Node 1 is connected to 2 and 3 for instance, and then also note that…arrow_forward
- You will be reading in a series of names from the keyboard. Count how many matching pairs there are – a matching pair is when two consecutive names are equal regardless of their case - and print the pairs. Input stops when the word ‘end’ is entered (also ignoring case). For example, Jack Jose jose Faith Robert Cynthia cynthia Cynthia Pierre ENd would print: Jose jose Cynthia cynthia cynthia Cynthia There were 3 matching pairs.arrow_forwardWritten in Python as well as screenshotted accepting user input and computed valuesarrow_forward
- 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





