Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PART 3 : Programming / Problem Solving Questions [ 5 0 Marks ] This part consists of 4 questions. You must attempt all questions. 2

PART 3: Programming/Problem Solving Questions [50 Marks]
This part consists of 4 questions. You must attempt all questions.
29
You should dedicate approximately 90 minutes for this part.
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:
D 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

The Database Experts Guide To SQL

Authors: Frank Lusardi

1st Edition

0070390029, 978-0070390027

More Books

Students also viewed these Databases questions