The document outlines a series of programming tasks aimed at practicing various coding concepts. These tasks include generating patterns, implementing sorting and searching algorithms, analyzing lists of numbers and strings, and performing conversions between number systems. Each task is designed to enhance skills in data manipulation and algorithm development.
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 ratings0% found this document useful (0 votes)
5 views
Python Lab Questions
The document outlines a series of programming tasks aimed at practicing various coding concepts. These tasks include generating patterns, implementing sorting and searching algorithms, analyzing lists of numbers and strings, and performing conversions between number systems. Each task is designed to enhance skills in data manipulation and algorithm development.
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/ 2
1.
Write a program to generate the pattern
2. Write a program to generate the pattern
3. Write a program to take a list as input from the user and find all the numbers ● Greater than the average ● Lesser than the average ● Create a list of the above two set
4. Write a program to implement bubble sort on a given range of numbers in a list
5. Write a program to implement linear search on a given range of numbers in a list
6. Write a program to create a list of strings and make a list which will have how many characters are there in each string . 7. Write a program to create a list of strings and Count the number of lower case letters Count the number of upper case letters Count the number of digits 8. Write a program to create a list of 10 years. Print all the years which are prime. 9. Write a program to create a list of 10 numbers and print all the numbers which are a. Even b. Prime 10. Write a program to create a list of 10 octal numbers. Ask the user which of the numbers has to be converted to binary and which has to be converted hexa and print the results 11. Create a list of strings and then create a list which will be the length of the strings. Convert the above two lists into a dictionary with key as the string and value as the string length 12. Create a list of 3 digit numbers,create another list which will be the sum of the digits. Convert the above two lists into a dictionary. 13. Create a list of strings and then create a list which will be the length of the strings, sort the second list in increasing order using any sorting algorithm. (Do not use the built in function). 14. Create a list of strings and then create a list which will be the length of the strings, find the maximum length of the string in the second list using any search algorithm. (Do not use the built in function). 15. Create a list of strings and identify all the strings which are palindromes and create a list of all the palindrome strings. 16. Create a list of phone numbers. Write a program that identifies the phone numbers beginning with a number given by the user . 17. Write a program to create a list of 10 hexa numbers. Ask the user which of the numbers has to be converted to binary and which has to be converted octal and print the results 18. Write a program to create a list of strings. Create a list of all the strings that have vowel in it. 19. Write a program to create a list of strings, create a list of all the strings whose length are even. 20. Write a program to create a list of numbers. a. Find the sum of all the numbers b. Find the average of all numbers c. Find the sum of numbers in a range given by the user. d. Find the average of numbers in a range given by the user,