ASSIGNMENT NO 28
1) Title: Program to Create and view elements of a list
2) Python source code:
3) Output:
ASSIGNMENT NO. 29
1) Title: Program to Create and view elements of a tuple
2) Python source code:
3) Output:
ASSIGNMENT NO. 30
1) Title: Program to access List Index and Values
2) Python source code:
3) Output:
ASSIGNMENT NO. 31
1) Title: Program to add two Lists
2) Python source code:
3) Output:
ASSIGNMENT NO. 32
1) TITLE: Program to check if a List is Empty or Not
2) PYTHON SOURCE CODE:
3) OUTPUT:
ASSIGNMENT NO. 33
1) TITLE: Program to Find the Largest Number in a List
2) PYTHON SOURCE CODE:
3) OUTPUT:
ASSIGNMENT NO. 34
1) TITLE: Program to Find the Second Largest Number in a List
2) PYTHON SOURCE CODE:
3) OUTPUT:
ASSIGNMENT NO. 35
1) TITLE: Program to Put Even and Odd elements in a List into Two Different Lists
2) PTHON SOURCE CODE:
4) OUTPUT:
ASSIGNMENT NO. 36
1) TITLE: Program to Find all Numbers in a Range which are Perfect Squares
and Sum of all Digits in the Number is Less than 10
2) PYTHON SOURCE CODE:
3) OUTPUT:
ASSIGNMENT NO. 37
1) TITLE: Program to Generate Random Numbers from 1 to 20 and Append Them
to the List
2) PYTHON SOURCE CODE:
4) OUTPUT:
ASSIGNMENT NO. 38
1) TITLE: Program to Remove the Duplicate Items from a List
2) PYTHON SOURCE CODE:
3) OUTPUT:
ASSIGNMENT N0. 39
1) TITLE: Program to create and view a dictionary
2) PYTHON SOURCE CODE:
3) OUTPUT:
ASSIGNMENT NO. 40
1) TITLE: Program to create and view elements of a set
2) PYTHON SOURCE CODE:
3) OUTPUT:
ASSIGNMENT NO. 41
1) TITLE: Program to Print values of dictionary
2) PYTHON SOURCE CODE:
4) OUTPUT:
ASSIGNMENT NO. 42
1) TITLE: Program to print all keys of dictionary
2) PYTHON SOURCE CODE:
3) OUTPUT:
ASSIGNMENT NO. 43
1) TITLE: Program to insert and delete from dictionary
2) PYTHON SOURCE CODE:
3) OUTPUT:
ASSIGNMENT NO. 44
1) TITLE: Program to sort (ascending and descending) a dictionary by value
2) PYTHON SOURCE CODE:
3) OUTPUT:
ASSIGNMENT NO. 45
1) TITLE: Program to concatenate dictionaries to create a new one
2) PYTHON SOURCE CODE:
3) OUTPUT:
ASSIGNMENT NO. 46
1) TITLE: Program to check whether a given key already exists in a dictionary.
2) PYTHON SOURCE CODE:
3) OUTPUT:
ASSIGNMENT NO. 47
1) TITLE: Program to merge two Python dictionaries
2) PYTHON SOURCE CODE:
3) OUTPUT:
ASSIGNMENT NO. 48
1) TITLE: Program to get the maximum and minimum value in a dictionary
2) PYTHON SOURCE CODE:
3) OUTPUT:
ASSIGNMENT NO. 49
1) TITLE: Program to Add a list of elements to a set
2) PYTHON SOURCE CODE:
3) OUTPUT:
ASSIGNMENT NO. 50
1) TITLE: Program to Update the first set with items that don’t exist in the second set
2) PYTHON SOURCE CODE:
3) OUTPUT:
ASSIGNMENT NO. 51
1) TITLE: Program to Return a set of elements present in Set A or B, but not both
2) PYTHON SOURCE CODE:
3) OUTPUT:
ASSIGNMENT NO. 52
1) TITLE: Program to check if two sets have any elements in common.
2) PYTHON SOURCE CODE:
3) OUTPUT:
ASSIGNMENT NO. 53
1) TITLE: Program to Remove items from set1 that are not common to both set1 and set2
2) PYTHON SOURCE CODE:
3) OUTPUT:
ASSIGNMENT NO. 54
1) TITLE: Function to check if a number is even or odd
2) PYTHON SOURCE CODE:
3) OUTPUT:
ASSIGNMENT NO. 55
1) TITLE: Function to find the maximum of two numbers
2) CODE:
3) OUTPUT:
ASSIGNMENT NO. 56
1) TITLE: Function with keyword arguments
2) CODE:
3) OUTPUT:
ASSIGNMENT NO. 57
1) TITLE: Function with default arguments
2) CODE:
3) OUTPUT:
ASSIGNMENT NO. 58
1) TITLE: Function to Find the Factorial of a Number Using Recursion
2) CODE:
3) OUTPUT:
ASSIGNMENT NO. 59
1) TITLE: Function to Find the Sum of the Digits of the Number Recursively
2) CODE:
3)OUTPUT:
ASSIGNMENT NO. 60
1) TITLE: Create a function named count vowels that accepts a string and returns the number of
vowels in the string.
2) CODE:
3) OUTPUT:
ASSIGNMENT NO. 61
1) TITLE: Write a function greet user that takes a user’s name as a parameter and prints a
personalized greeting message.
2) CODE:
3) OUTPUT:
ASSIGNMENT NO. 62
1) TITLE: Given a sequence of integers that end with a 00. Print the sequence in reverse order. Don't
use lists or other data structures. Use the force of recursion instead.
2) CODE:
3) OUTPUT:
ASSIGNMENT NO. 63
1) TITLE: To keep record of students’ data, manipulate files to store, update, and delete students’
information.
2) CODE:
3) OUTPUT:
ASSIGNMENT NO. 64
1) TITLE: Write a Python program that reads the content of a text file and prints it to the console.
2) CODE:
3) OUTPUT:
ASSGNMENT NO. 65
1) TITLE: Create a Python program that takes user input (a string) and writes it to a new text file.
2) CODE:
3) OUTPUT:
ASSIGNMENT NO. 66
1) TITLE: Write a Python program that reads a text file, counts the number of words in it, and writes
the word count to a new file.
2) CODE:
3) OUTPUT:
ASSIGNMENT NO. 67
1) TITLE: Write a Python program that reads the content of one text file and writes it to another file.
2) CODE:
3) OUTPUT:
ASSIGNMENT NO. 68
1) TITLE: Develop a Python program that counts the number of lines in a text file and displays the
count.
2) CODE:
3) OUTPUT:
ASSIGNMENT NO. 69
1) TITLE: Write a Python program that appends a user-provided string to the end of an existing text
file.
2) CODE:
3) OUTPUT:
ASSIGNMENT NO. 70
1) TITLE: To keep record of patients’ medical data, manipulate files to store, update, and delete such
information.
2) CODE:
3) OUTPUT:
ASSIGNMENT NO. 71
1) TITLE: Write a python program to create two 3X3 random matrixes and perform following
operation: (a)Addition (b) subtraction (c) multiplication and display shape, dimensions, dtype, Rank
and flatten output of every o/p matrix.
2) CODE:
3) OUTPUT:
ASSIGNMENT NO. 72
1) TITLE: Write a Python program to plot line chat, bar chart, pi chart, scatter chart, histogram for
taking two
2) CODE:
3) OUTPUT: