Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1 : 1 0 marks Given the below tuple that includes three records: my _ tuple = ( A , 1 8

Question 1: 10 marks
Given the below tuple that includes three records: my_tuple=("A",18,16,"B",12,8,"C",10,7)
Each record is composed of the student's name and two grades. You are asked to:
Create a list which should be equal to the list of the given tuple.
In a loop and using this list:
calculate the average grade for each student.
append the name along and the average grade for each of the students to a new list.
Display the result as shown below.
Expected Output:
['A',17.0,'B',10.0,'C',8.5]
image text in transcribed

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

More Books

Students also viewed these Databases questions