Transcript
![Page 1: Python File Handling. In all the programs you have made so far when program is closed all the data is lost, but what if you want to keep the data to use](https://reader036.vdocument.in/reader036/viewer/2022072014/56649e805503460f94b847ac/html5/thumbnails/1.jpg)
PythonFile Handling
![Page 2: Python File Handling. In all the programs you have made so far when program is closed all the data is lost, but what if you want to keep the data to use](https://reader036.vdocument.in/reader036/viewer/2022072014/56649e805503460f94b847ac/html5/thumbnails/2.jpg)
File Handling
In all the programs you have made so far when program is closed all the data is lost, but what if you want to keep the data to use
later? This is where file handling comes in.
Python allows you to read data in from and save data to external text files.
We use this symbol to represent the storing of data in a flowchart:
![Page 3: Python File Handling. In all the programs you have made so far when program is closed all the data is lost, but what if you want to keep the data to use](https://reader036.vdocument.in/reader036/viewer/2022072014/56649e805503460f94b847ac/html5/thumbnails/3.jpg)
Example: Flowchart
Design and code a program that asks the
user to input their name and age and
stores the data in a text file.
Start
End
INPUT Name
INPUT Age
SAVE Name + Age
![Page 4: Python File Handling. In all the programs you have made so far when program is closed all the data is lost, but what if you want to keep the data to use](https://reader036.vdocument.in/reader036/viewer/2022072014/56649e805503460f94b847ac/html5/thumbnails/4.jpg)
Example: Python
Here is part of the solution to the problem, you need to complete it.