
GIAC Python Coder
Domain 1Objective 4
Functions, Classes and Objects GPYC Practice Questions (Page 3)
Part of the Python Fundamentals domain, which makes up ~43% of our current practice bank. GIAC (SANS) does not publish an official question count, but from its 120-minute exam (~50–80 total, ~22–34 in this domain), expect 4–7 from this objective — we provide 45 practice questions to prepare you well beyond it. (estimate)
45questions here
9free pages
14concepts
Questions 11–15
- 11
Which symbol is used to apply a decorator to a function?
Select an answer first - 12
A developer is refactoring a function that currently has many positional parameters. The team wants to improve readability and reduce errors when calling the function. They also need to maintain backward compatibility with existing calls. Which strategy is most effective?
Select an answer first - 13
In Python, which scope is searched first when a name is referenced inside a function?
Select an answer first - 14
A developer is implementing a 'Packet' class that represents network packets. They want to be able to compare two packets for equality based on their 'src_ip' and 'dst_ip' attributes. Which special method should they implement?
Select an answer first - 15
A developer is implementing a 'User' class with a 'password' attribute. They want to prevent accidental modification of the password after the user is created, but still allow reading it. Which approach best achieves this?
Select an answer first
Finished these 5 questions?
Review the revealed explanations, or continue through the curriculum.
Free Basic Practice is a study aid with revealable answers — not a scored exam. Examers.io is independent and not affiliated with or endorsed by GIAC (SANS). “GPYC” is a trademark of its owner, used for identification only.