This document contains instructions for 11 programming tasks involving file handling, functions, and databases in Python. The tasks include creating and manipulating text files, CSV files, binary files, and database tables to perform operations like inserting records, searching, counting characters, and updating data. Functions are used to modularize some of the tasks like counting letters, words, and lines in files. MySQL queries are also mentioned for one task involving a database table.
This document contains instructions for 11 programming tasks involving file handling, functions, and databases in Python. The tasks include creating and manipulating text files, CSV files, binary files, and database tables to perform operations like inserting records, searching, counting characters, and updating data. Functions are used to modularize some of the tasks like counting letters, words, and lines in files. MySQL queries are also mentioned for one task involving a database table.
This document contains instructions for 11 programming tasks involving file handling, functions, and databases in Python. The tasks include creating and manipulating text files, CSV files, binary files, and database tables to perform operations like inserting records, searching, counting characters, and updating data. Functions are used to modularize some of the tasks like counting letters, words, and lines in files. MySQL queries are also mentioned for one task involving a database table.
a. Create and insert records in to the binary file “Player.dat” with following details as a List object player code, player name, score, rank. ([pcode,pname,score, rank]) b. Open the file in read mode to read and display all the records. c. Open the file in read mode to search for the player code and display all the details of the player. 2. Write a program find the maximum and minimum value for a given set of integers. To create a text file and count the number of vowels, uppercase, lowercase, digits and special characters. 3. Write a menu driven program to a. To create a CSVfile “games.csv” and insert the following details to the file Game ID, Game Name and Points ([gid,gname,points]). Enter 3 records. b. Open the file in read mode and display all records c. Open the file in read mode to search and display the details of a particular game with gameid as input. 4. Write a menu driven program to create a table, insert the records in to the table and to display them. Database Employee, User root, password devi Table Empl,(Eno,Ename,Esal) 5. i. Write a program using function AMCount() which creates a text file “poem.txt” , count and display the number of occurrences of alphabets A and M both uppercase and lowercase individually. ii. Write a program user defined function to perform linear search operation in the given list of integers. 6. i. Write a user defined function Count_Words() which creates a text file “sample.txt” , count and display the number of 4 letter words from the text file. ii.Write a function to perform linear search operation in the given list of integers. 7. i. Write a program using function Count_Char() which creates a text file “myfile.txt” and count and display the number of digits, uppercase, lowercase alphabets and vowels from the text file. ii.Write a program to perform the search operation in a list of integers 8. i. Write a program using function ICount() which creates a text file “notes.txt”, count and display the number of lines that starts with the letter “I”. ii. Write a program using function Display() to create a text file “Myfile.txt” , count and display the number of “me” and “my” in the text file. 9. Write a menu driven program to a. To create a CSVfile “games.csv” and insert the following details to the file Game ID, Game name and points ([gid,gname,points]). Enter 3 records. b. Open the file in read mode and display all records c. Perform the update operation in the csv file. 10. Write a menu driven program to update employee name using empno and display the updated records Database Employee, User root, password devi Table Empl,(Eno,Ename,Esal) 11. Read MySQL queries given in the record program PDF