0% found this document useful (0 votes)
10 views2 pages

Python Assignment 3

This document is an assignment for the Programming With Python course at Bhivrabai Sawant Polytechnic for the academic year 2024-25. It covers data structures in Python, including lists, tuples, sets, and dictionaries, with specific tasks and questions for students to complete. The assignment is divided into sections with varying marks, focusing on explanations, comparisons, and programming exercises.
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)
10 views2 pages

Python Assignment 3

This document is an assignment for the Programming With Python course at Bhivrabai Sawant Polytechnic for the academic year 2024-25. It covers data structures in Python, including lists, tuples, sets, and dictionaries, with specific tasks and questions for students to complete. The assignment is divided into sections with varying marks, focusing on explanations, comparisons, and programming exercises.
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
You are on page 1/ 2

JSPM’s

Bhivrabai Sawant Polytechnic,


Wagholi, Pune- 412207.
(Academic Year 2024-25)

Assignment - 3

Sub: - Programming With Python(PWP) Subject Code:22616


Semester: 06​ Chapter : 3

Unit 3. Data Structures in Python

​ ​ ​​ ​ ​ ​ ​ ​ ​ ​ ​ ( 14 MARKS)

✦ Attempt the Following (2 Marks) :-

1.​ Explain two ways to add objects / elements to a list ?


2.​ Describe Tuples in Python. ?
3.​ Compare list and tuple.?
4.​ Write down the output of the following Python code.
indices=['zero','one','two',' three','four', 'five']
i) indices[:4]
ii) indices[:-2]
5.​ Explain any two built in methods of set in python with example

✦ Attempt the Following (4 Marks) :-

1.​ Explain four built-in list functions.?


2.​ T = ('spam, Spam', SPAM!', 'SaPm')
print (T [2])
print (T[-2])
print (T[2:])
print (List (T))
3.​ Explain four Built-in tuple functions in python with example. ?
4.​ Write a program to create a dictionary of students that includes their ROLL NO and NAME ?
i) Add three students in above dictionary
ii) Update name=’Shreyas’ of ROLL NO=2
iii) Delete information of ROLL NO=1
5.​ Write any four methods of the dictionary.?
✦ Attempt the Following (6 Marks) :-

1.​ Write python program to perform following operations on Set (Instead of Tuple)
i) Create set
ii) Access set Element
iii) Update set
iv) Delete set
2.​ Write a Python Program to accept values from user in a list and find the largest number and
smallest number in a list.

You might also like