Web17 Mar 2024 · Please suggest if its possible to shorten the code and make it better. METHOD USED 1.The details of the students who scored "B" grade are fetched from file.txt and then written in another text file temp.txt. 2.After that ,the data is stored in a list of lists. 3.Finally the details are stored in a dictionary and the output is displayed.
CS Class 12th Python Projects - CopyAssignment
Web15 Jul 2024 · Python readline () syntax 1 2 file = open("filename.txt", "r") file.readline () The readline method takes one parameter i.e size, the default value for the size parameter is -1. It means that the method will return the whole line. It is an optional parameter, we can specify the number of bytes from a line to return. readlines () Syntax 1 2 Web5 Sep 2024 · So let’s get started and sneer at IP Python Projects for Class 12. Table Of Contents 1. ATM Simulation Project 2. Basic Cricket Game 3. Alarm Clock Application 4. Contact Management System 5. Password … bromley hsbc address
File Handling in Python Class 12 Computer Science - YouTube
Web4 Nov 2024 · Write a function in Python that counts the number of “Me” or “My” words present in a text file “STORY.TXT”. If the “STORY.TXT” contents are as follows: My first book was Me and My Family. It gave me chance to be Known to the world. The output of the function should be: Count of Me/My in file: 4 class-12 1 Answer +1 vote Web29 Nov 2024 · File Handling in Python Class 12 MCQ 1. A text file stores information is __________ characters. a. ASCII b. Unicode c. Both a) and b) d. None of the above Show Answer Hide Answer c. Both a) and b) 2. In text files, each line of text is terminated, with a special character known as ___________. a. EOL b. EOF c. EEF d. All of the above Web4 Oct 2024 · Technically, we get back an _io.TextIOWrapper object, but we don't talk about it that way; we refer to this thing as a file object.. File objects have a read method, which gives back a string representing the entire contents of that file: >>> f. read 'Python Log -- Day 980\n\nToday I learned about metaclasses.\nMetaclasses are a class\'s class.\nMeaning … bromley hub