0% found this document useful (0 votes)
4 views

Python programming-lab

The document lists various Python programming lab exercises, including tasks such as computing the GCD, finding square roots, and generating Fibonacci series. It also covers list manipulations, string operations, dictionary handling, and sorting algorithms. Additionally, it includes programs for simulating graphical elements using Pygame.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Python programming-lab

The document lists various Python programming lab exercises, including tasks such as computing the GCD, finding square roots, and generating Fibonacci series. It also covers list manipulations, string operations, dictionary handling, and sorting algorithms. Additionally, it includes programs for simulating graphical elements using Pygame.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Python Programming Lab

List of Programs
1. Compute the GCD of two numbers.
2. Find the square root of a number (Newton‘s method)
3. Exponentiation (power of a number)
4. Find the maximum of a list of numbers
5. Print the Fibonacci series
6. To print a pyramid
*
**
***
****
7. Find the sum of all even numbers in a list.
8. Rearrange list such as it has all even numbers followed by odd numbers
9. Remove the duplicate elements in an array
10. Array rotation i.e rotate by 2 input: 1,2,3,4,5,6,7 output: 3,4,5,6,7,1,2
11. Reversal algorithm for array rotation
12. Split the array and add the first part to the end
13. Reversing a List
14. Cloning or copying a list
15. Count occurrences of an element in a list
16. Remove multiple elements from a list
17. Remove empty tuples from a list
18. Program to print duplicates from a list of integers
19. Break a list into chunks of size N
20. Sort the values of first list using second list
21. Check if a string is palindrome or not
22. Ways to remove i’th character from string
23. Check if a Substring is Present in a Given String
24. Find length of a string
25. Print even length words in a string
26. Program to accept the strings which contains all vowels
27. Count the Number of matching characters in a pair of string
28. Remove all duplicates from a given string
29. Program to check if a string contains any special character
30. Count the vowels from a string.
31. Reverse the words of a sentence
32. Find the sum of all items in a dictionary
33. Ways to remove a key from dictionary
34. Ways to sort list of dictionaries by values
35. Merging two dictionaries
36. Maintain data of students marks
37. Linear search and Binary search
38. Selection sort, Insertion sort
39. Merge sort
40. First n prime numbers
41. Multiply matrices
42. Programs that take command line arguments (word count)
43. Find the most frequent words in a text read from a file
44. Simulate elliptical orbits in Pygame
45. Simulate bouncing ball using Pygame

You might also like