Test yourself on File Handling with exam style questions, marked instantly.
Flashcards that come back just before you would forget them.
A revision plan that remembers what you know and shows what to do next.
See which topics you have nailed and which need another look.
Quiz yourself on File HandlingGet your flashcardsBuild my revision planTrack my progressPermanent Storage
Variables are temporary - turn off the computer and they're gone! Files provide permanent storage. Think of files like notebooks - you can write in them, read from them, and they're still there tomorrow. Games save your progress to files. Apps store your settings. Databases are just organised files. Without file handling, every program would start fresh every time!
Every use of a file starts with OPEN and ends with CLOSE. In between, the program reads or writes. File handling is named by OCR and Edexcel. AQA names none. Here is the OCR style:
myFile = open("data.txt")
line = myFile.readLine()
myFile.writeLine("New line")
myFile.close()
Edexcel asks you to read from and write to comma separated value text files, and does not set a strict pseudocode style.
Make this stick
Signing in gives access to all PrepWise features.