0% found this document useful (0 votes)
3 views1 page

Python Programming Assignment 2

This document outlines the requirements for Python Programming Assignment 2, which is due on 08/11/2025. It includes instructions for writing answers in one's own words, using A4 sheets, and coding in Python. The assignment consists of three questions related to file handling, recursion, and creating a function to process student data.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

Python Programming Assignment 2

This document outlines the requirements for Python Programming Assignment 2, which is due on 08/11/2025. It includes instructions for writing answers in one's own words, using A4 sheets, and coding in Python. The assignment consists of three questions related to file handling, recursion, and creating a function to process student data.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Python Programming

Assignment 2

Note: 1) The submission date for this assignment is 08/11/2025.


2) This assignment is to be written on A4 sheets only.
3) Please try to write the answers to subjective questions in your own words.
4) Write codes for programming questions in Python only using proper syntax.

1) Discuss the steps involved in reading data from a file and writing data to another file.

2) What is recursion? Explain with an example where recursion is more suitable than
iteration.

3) Create a function that accepts a list of tuples, where each tuple contains a student’s
name and marks in three subjects. The function should:

●​ Calculate the total and average marks.


●​ Return a dictionary with student names as keys and averages as values.
●​ Display names of students (in title case) and average marks up to 2 decimal
places scoring above 75% using a set.

You might also like