0% found this document useful (0 votes)
4 views12 pages

Python Assignment 04 C76 (1)

The document outlines a series of Python programming tasks for a student named Mohit Sonu Dhangar, focusing on data structures such as lists, tuples, sets, and dictionaries. Each task includes specific operations to perform, such as printing elements, modifying data, and joining collections. The tasks are to be completed and submitted by January 28, 2025.
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)
4 views12 pages

Python Assignment 04 C76 (1)

The document outlines a series of Python programming tasks for a student named Mohit Sonu Dhangar, focusing on data structures such as lists, tuples, sets, and dictionaries. Each task includes specific operations to perform, such as printing elements, modifying data, and joining collections. The tasks are to be completed and submitted by January 28, 2025.
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/ 12

Roll No :- C-76 Name:- M ohit Sonu Dhangar

Class :- SEC_C Batch:- C4

Date Of Programs :- 22/01/2025 Date Of Submission:-28-01-2025

1: Python program to create list of all your family members.


Perform following operations

a.Print 3rd and 2nd


last member.

b.Replace your name by xyz.

c.Add one member from your friend.

d.Print length of list.

e.Remove your friend from list.

f.Sort list in ascending order.

g.Copy list to another list.

h.Join 2 lists
2: Python program to create list of all friends. Perform above operations on it

a.Print 3rd and 2nd


last member.

b.Replace your name by xyz.

c.Add one member from your friend.

d.Print length of list.

e.Remove your friend from list.

f.Sort list in ascending order.

g.Copy list to another list.

h.Join 2 lists
Code:
Output:

3:Python program to create tuple of students with Rno, name, class, div, and
branch. Perform following operations.

a.
Print 2nd and last
member.

b.
Add fees to the tuple.

c.
Delete div.

d.
Print all members using loop.

e.
Create one more tuple and join it.
Output:
4: Python program to repeat above for books
detail
a.
Print 2nd and last
member.

b.
Add fees to the tuple.

c.
Delete div.

d.
Print all members using loop.

e.
Create one more tuple and join it.

CODE:
OUTPUT:

5: Python program to create set of 10 prime


numbers.

a.
Print 3rd to 7 elements.

b.
Add 11th element.

c.
Join two sets.

d.
Remove 7th element.

e.
Print all items using loop
CODE:

OUTPUT:
6:Python program to create 2 sets of 5 flowers each perform. Perform following
operations.

a.
Print two sets.

b.
Perform union, intersection,
addition and subtraction operation.

c.
Print resulted sets.
CODE:
OUTPUT:

7: Python program to create dictionary of at least


10 words meaning. Perform following operations.

a.
Access 2nd word and its meaning.

b.
Change 3rd word with new
word.

c.
Remove a particular word.

d.
Print all word using loops.

e.
Copy it to other dictionary.
CODE:

OUTPUT:
8: Python program to create dictionary of at least
10 roll numbers and student name meaning.
Perform above operations.
CODE:

OUTPUT:

You might also like