File Handling

Lesson Instructions

Watch and follow the YouTube video,  the lesson contains three parts:

File Handling Full Lesson Video.mp4

Task - File Handling Activity

Task - Exam Questions - Deliberate Practice

Exam Questions - Web

Mark Scheme

Question 1

1 mark per bullet

Note, pseudocode shown below is an example – candidates may answer very differently, but award marks if intention can be seen.

firstname = input(“Enter firstname”)

lastname = input(“Enter lastname”)

age = input(“Enter age”)

username = firstname.substring(0,2) + lastname + age

file = open(“username.txt”)

file.writeLine(firstname + “,” + lastname + “,” + age + “,” + username)

file.close()