~ Solve Problems and Learn how to code in Python

1 - Introducing File Handling in Python -Reading and Writing (searching/sorting) from files

Ready? Make a note of the documentation, presentation and information below and then get started on the challenges

Note: You may not be able to take in all the information on file handling below in at one glance or sitting, but keep in mind that you may want to start the challenges and keep coming back to this information to see if you can find what you need to solve the problem. It's all here and with the information provided you should be able to solve not just this challenge, but ANY challenge /problem that involves file handling in python!

What would we do without files? Check out this video on facebook servers. Ever wondered where all the data you save/store/read on facebook is stored? Here's where! File handling is key in programming, as it deals with working with files and storing data. Without files, we are simply running code but when the program stops and the computer is switched off, we're left with nothing! Saving is essential, and where do we save stuff? In files. On to the challenges soon ....

Presentation - File Handling

Official Python 3 Documentation

Why do we need to read and write from files?

A file is some information or data which isn't lost when you switch off your computer! It is stored externally in your computer storage which means it can be accessed whenever you want. You already know about different kinds of file , like your music files, video files, text files. You can only imagine the sort of massive "files" that an organisation like facebook holds on each of us! Python gives you easy ways to manipulate these files. Generally we divide files in two categories, text file and binary file. Text files are simple text where as the binary files contain binary data which is only readable by computer.

Code your solution here

Systems Life Cycle (in a nutshell): Analyse - Design - Create - Test - Evaluate. Designing something or writing out some pseudocode before you actually write code is always a good idea! Get in to the habit of doing so! You can draw your flowchart here and screenshot it.

A sample flow chart (design) for this particular challenge could look like:

Flowchart: Python program to get the Fibonacci series between 0 to 50
Each challenge section below provides an online drawing tool where you can dynamically create flowcharts. Screenshot them into your presentation for submission.

Solutions & Answers

Answers /Solutions in the "members area" drive under: "Solve and Learn >>SOLUTIONS"

Testing Table

You may want to read a little about Testing first. A teacher may go through some examples with you. Feel free to fill in the test table here, and screenshot it in to your powerpoint. Testing is absolutely essential once you have created a program!
Test No. Description Test Data(input) Expected Outcome Actual Outcome Further Action?
Coming soon!