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

DECS-3RD-LIST OF EXPERIMENT OF PYTHON PROGRAMMING LAB 5 To All

Uploaded by

xovek90259
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views2 pages

DECS-3RD-LIST OF EXPERIMENT OF PYTHON PROGRAMMING LAB 5 To All

Uploaded by

xovek90259
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

LIST OF EXPERIMENT OF PYTHON PROGRAMMING LAB: -

Write Python program to perform following operations on Lists:

1. Write a Python program to sum all the items in a list.


2. Write a Python program to multiplies all the items in a list.
3. Write a Python program to get the largest number from a list.
4. Write a Python program to get the smallest number from a list.
5. Write a Python program to reverse a list.
6. Write a Python program to find common items from two lists.
7. Write a Python program to select the even items of a list.

Write Python program to perform following operations on Tuples:

1. Create a tuple and find the minimum and maximum number from it.
2. Write a Python program to find the repeated items of a tuple.
3. Print the number in words for Example: 1234 => One Two Three Four

Write Python program to perform following operations on Set:

1. Write a Python program to create a set, add member(s) in a set and remove one item from set.
2. Write a Python program to perform following operations on set: intersection of sets, union of sets, set
difference, symmetric difference, clear a set.
3. Write a Python program to find maximum and the minimum value in a set.
4. Write a Python program to find the length of a set.

String manipulation using Python programming

1. Write a Python program that counts the number of characters in a string entered by the user.
2. Create a program that checks if a given string is a palindrome.
3. Develop a program that converts a given string to uppercase.
4. Write a Python script that finds and replaces a specific substring within a string entered by the user.
5. Create a program that counts the occurrences of each character in a string and prints the results

Write Python program to perform following operations on Dictionaries:

1. Write a Python script to sort (ascending and descending) a dictionary by value.


2. Write a Python script to concatenate following dictionaries to create a new one.
a. SampleDictionary:
b. dic1 ={1:10, 2:20}
c. dic2 ={3:30, 4:40}
d. dic3 ={5:50,6:60}

3. Write a Python program to combine two dictionary adding values for common keys.

a. d1={'a':100,'b':200,'c':300}
b. d2={'a':300,'b':200,'d':400}

4. Write a Python program to print all unique values in a dictionary.


a. Sample Data: [{"V":"S001"}, {"V": "S002"}, {"VI": "S001"}, {"VI": "S005"},
{"VII":"S005"}, {"V":"S009"}, {"VIII":"S007"}]

5. WriteaPythonprogram tofindthehighest3values inadictionary.

Write Python program to demonstrate math built-in functions and String built-in functions.

1. Write a Python function that accepts a string and calculate the number of upper-case letters and
lower-case letters.
2. Write a Python program to generate a random float where the value is between 5 and 50 using
Python math module.

Write Python program to perform Functions and Recursion using Python

1. Write a Python function to calculate the factorial of a number using recursion.


2. Create a recursive function to compute the Fibonacci sequence up to a specified number of terms.
3. Develop a function that checks if a number is prime or not.
4. Write a Python script that computes the sum of natural numbers up to a specified number using recursion.
5. Create a recursive function to calculate the power of a number raised to another.

You might also like