The document outlines a series of programming tasks and challenges, including finding roots of quadratic equations, generating multiplication tables, and creating menu-driven programs for various mathematical and string operations. It also includes tasks for working with lists, dictionaries, and tuples, such as managing student records and converting numbers to words. Overall, the document serves as a comprehensive guide for practicing programming skills across different concepts.
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 ratings0% found this document useful (0 votes)
5 views
PYTHON PRACTICE PROGRAMS
The document outlines a series of programming tasks and challenges, including finding roots of quadratic equations, generating multiplication tables, and creating menu-driven programs for various mathematical and string operations. It also includes tasks for working with lists, dictionaries, and tuples, such as managing student records and converting numbers to words. Overall, the document serves as a comprehensive guide for practicing programming skills across different concepts.
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
Journal Questions
1. Program to find the roots of a quadratic equation
2. Program to print the multiplication table of a number. 3. Menu driven program to find the area of : (use while loop to create the menu) 1. Rectangle 2. Square 3. Circle 4. Exit 4. Program to check whether a given number is Armstrong or not 5. Program to find the sum of digits of a number(Eg: if the number is 345, the output should be 3+4+5+=12) 6. Menu driven program to find the sum of the following series: 1. 1+x+x2+x3+x4+…………… a. x-x2/3! + x-x3/5! + x-x4/7! +…………… 7. Menu driven program to find print the following pattern: 1 A 1 2 B C 1 2 3 D E F 1 2 3 4 G H I J 8. Program to check whether a given string is palindrome or not. 9. Program to find the longest substring in a given string. 10.Program to check whether a particular word is present in the string or not. 11.Program to count the number of uppercase letters, lower case letters, digits in a given string. 12.Program to split the list L into L1 and L2. L1 having all positive and L2 having all odd numbers. 13.Program to find the largest element in a list. 14.Menu driven program to perform linear and binary search. 15.Program to find the sum of each row and each column separately. 16.Program to find the transpose of a Matrix. 17.Create a list of n students with roll no, name, stream, and marks. Write a menu driven program to: 1. Add new students 2. Display the details of those students whose marks > 85 3. Delete a particular record based on roll no 4. Update the record 5. Display the list 18.Program to find the sum of all elements in a tuple. 19.Program to create a tuple of the first nine terms in the Fibonacci series. a) Program to create a tuple of names and display only those names whose for second character is ‘A’ or ‘a’. 20.Program to create a nested tuple and find the largest element in the tuple.
21. Program to create names of employees and their salaries as input
and store them in a dictionary. Here n is to input by the user. 22.Create a dictionary called TEACHERS with subject taught as the key and name of the teacher as values. Modify the teacher’s name of the subject “English” and display the updated dictionary. 23.Write a program to convert a number entered by the user into its corresponding number in words. for example: if the input is 876 then the output should be ‘Eight Seven Six’. 24.Write a program to input your friend’s, names and their phone numbers and store them in the dictionary as the key-value pair. Perform the following operations on the dictionary: Display the Name and Phone number for all your friends. a. Add a new key-value pair in this dictionary and display the modified dictionary b. Add a new key-value pair in this dictionary and display the modified dictionary c. Delete a particular friend from the dictionary d. Modify the phone number of an existing friend e. Check if a friend is present in the dictionary or not f. Display the dictionary in sorted order of names