Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Python, What code do I write for this? # INPUT LIST contains the scores submitted before the due - date. # There are multiple

In Python, What code do I write for this?
# INPUT LIST contains the scores submitted before the due-date.
# There are multiple elements for each student, since they are allowed to
submit more than once.
# below is a nested list. There is a list for each student.
scores =[[92,95],[98],[70,95,90,75,195],[10,75,80],[],[-10,
90],[80,70,60]] # Real one
# PART 1
# How Many students submitted scores? Figure out the number of students
and
# store the results into a variable called
# Print the number of students in the following format:
# "There are xx students"
# Use f-print and use the variable in your print statement.
# PART 2
# Use list comprehension to create a list for student names
# The list created is to be called
# The entries in need to be: 'Student_0', 'Student_1',
...
# Print the student names and scores, using ,,
# Print the following block-title to start the block.
# "STUDENT NAMES and SCORES: ________________________________________"
# Use f-strings for printing.
# PART 3
# If a student has not submitted a score, set the student's score to 0.
# Update if there are any students who did not submit scores.
# Start a block with the following block_title:
# "STUDENTS WHO DID NOT SUBMIT SCORES:
________________________________________"
# Then for each student who did not submit a score, print:
# "Student xx did not submit any scores"
# PART 4
# Students are allowed to submit no more than 3 scores.
# If a student has submitted more than 3 scores,
# update the corresponding entry in by keeping only the highest 3
scores for that student
# Print the student names and their scores, after the update.
# Print the following block-title to start the block.
# "UPDATED SCORES, HIGHEST 3
SUBMISSIONS________________________________________"
# Print the name of each student (from ) and the updated
scores.
# Use f-strings for printing.
# Part 5
# If a student has a negative score, it is a mistake, correct it by
# replacing the negative entry by its absolute value.
# As per the printing instructions in Part 4, print the name and scores
for each student,
# using f-strings.
# The block-title for this part is
# "UPDATED SCORES, NEGATIVE SCORES CORRECTED
_____________________________________"
# Part 6
# If there are any scores >100.0, set the score to 100.0
# Print the names and scores of the students as per the instructions given
in Part 4.
# The block-title for this part is:
# "UPDATED SCORES, SCORES >100 RESET to 100
________________________________"
# Part 7
# In this part, you figure out who graded the scores.
# Safiyah always grades the 1st score of a student.
# If there are only 2 scores for a student, then the graders are Safiyah
and Gabriel.
# If a student has submitted 3 or more scores, Dr. A also gets to grade.
# Print each student's name and its graders (on the same line)
# Follow the printing instructions given in Part 4.
# The title-block for this part is:
# "THE GRADERS: __________________________________"
# Part 8
# The final score for a student is the highest score.
# Select the highest score for each student and store the values in a new
list .
# Print the final score for each student.
# Follow the instructions in Part 4.
# The title-block for this part is:
# "FINAL SCORES: ________________________________"
# Highest score: For each student, select the highest score as the final
score
# Part 9
# Store all the final scores in a tuple called
# Print the final scores of the students from on a single line.
# Your print statament should look like:
# "STUDENT FINAL SCORES in a tuple: (xx, xxx, nnn, yyy)"
# Part 10
# Compute and print the class average from
# Then print the following, each a single line,
# The class average,
# The lowest score in class
# The highest score in class.
# Label each line properly, such as "The class average is xxx", etc.
# The title-block for this part is:
# "SUMMARY:

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Readings In Database Systems

Authors: Michael Stonebraker

2nd Edition

0934613656, 9780934613651

More Books

Students also viewed these Databases questions

Question

What is DDL?

Answered: 1 week ago