Python Assignment 04 C76 (1)
Python Assignment 04 C76 (1)
h.Join 2 lists
2: Python program to create list of all friends. Perform above operations on it
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:
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:
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: