Frames and Layouts: Creative Logic for Davao Young Designers
Davao families seeking creative tech can use animation as sequential logic training. Enquire +92 322 4217059. No invented Davao studio.
A 2D digital animation and story design course in Davao City covers Canva layout skills and frame-by-frame animation in OpenToonz—building sequential logic that also supports STEM design thinking.

In Python file handling, the files your code interacts with do not reside inside the Python script itself; they are stored separately on the hard disk. Because file operations depend on external storage, several common issues can arise:
When any of these issues occur during execution, Python raises an error and crashes your program immediately, halting further execution.
An exception is a runtime error that occurs while your code is actively running.
To prevent crashes, Python provides the try and except keywords:
Attempting to open a non-existent file (missing.txt) in read mode causes Python to halt:
# Attempting to read a non-existent file without handling
with open("missing.txt", "r") as file:
content = file.read()
print(content)
Because missing.txt does not exist on the hard disk at that path, Python raises a FileNotFoundError and terminates the program.
By wrapping the operation inside a try block and catching FileNotFoundError, the program handles the situation cleanly:
# 1. Try attempting the file operation
try:
with open("missing.txt", "r") as file:
content = file.read()
print(content)
# 2. Intercepting FileNotFoundError if the file is missing
except FileNotFoundError:
print("File not found")
missing.txt in read mode inside the try block.except FileNotFoundError: block.Exception handling is not limited to displaying error messages; you can also take corrective recovery actions, such as automatically creating a missing file and writing required data into it.
# Target file that does not yet exist on disk
filename = "my_info.txt"
# 1. Attempting to open and read the file
try:
with open(filename, "r") as file:
content = file.read()
print(content)
# 2. If the file is missing, automatically create it and write data
except FileNotFoundError:
print(f"'{filename}' not found. Creating file and writing data...")
# Open in write mode ('w') to create the file and store records
with open(filename, "w") as f_out:
f_out.write("Name: GitHub Copilot\nAge: 1\n")
# Read and print the newly written contents
with open(filename, "r") as f_in:
content = f_in.read()
print("File created successfully! Contents:")
print(content)
my_info.txt in read mode.FileNotFoundError is triggered.except block catches the error and opens my_info.txt in write mode ('w'), which creates the file on disk.Unlike hardcoded variables, files reside externally on the hard disk. File handling operations often encounter real-world storage issues—such as the target file not existing, being located in a different directory path, or being opened in an incorrect mode. If these external issues are unhandled, Python raises a runtime exception and immediately crashes the program.
The try block wraps code that might potentially raise an error or exception during execution. The except block specifies the error type to listen for (such as FileNotFoundError) and defines the specific recovery action Python should take if that error occurs. Using try...except prevents the program from terminating with a crash traceback, allowing it to recover cleanly and continue executing.
Beyond printing a user-friendly error message, an except block can perform automatic recovery actions—such as creating the missing file on the spot. When catching FileNotFoundError, the program can open the filename in write mode ('w'), write necessary initial records or configuration data into it, and then proceed with reading or processing that data smoothly.
OpenToonz for Kids on Udemy.
Disclosure: This page contains affiliate links. We may earn from qualifying purchases at no extra cost to you. Links are intended for parents and educators, not as marketing directed at young children.
Davao families seeking creative tech can use animation as sequential logic training. Enquire +92 322 4217059. No invented Davao studio.
Students learn graphic layout, visual asset creation, and character design in Canva for Kids, combined with frame-by-frame 2D animation and storyboard techniques in OpenToonz.
Animation teaches coordinate movement, timeline management, user interface (UI) design, and visual sequencing—critical computational skills needed when building robot interfaces and software games.
Contact our instructors via WhatsApp directly from this page, view sample student animation reels, and reserve a free live trial class.