Examers.io
ExamsOrganizationsHow it worksPricingHelp & FAQ
GIAC (SANS) logo

GIAC Foundational Cybersecurity Technologies

Domain 4Objective 1

Logic & Programming GFACT Practice Questions (Page 5)

Part of the Programming and Logic domain, which makes up ~12% of our current practice bank. GIAC (SANS) does not publish an official question count, but from its 120-minute exam (~50–80 total, ~6–10 in this domain), expect 6–10 from this objective — we provide 40 practice questions to prepare you well beyond it. (estimate)

40questions here
8free pages
6concepts

Questions 21–25

  1. 21application · medium

    A developer is debugging a Python script that reads a file and processes each line. The script works on the developer's machine but fails with a `FileNotFoundError` when run on the production server. What is the most likely cause?

    Select an answer first
  2. 22application · medium

    A network administrator is writing a script to check the status of multiple servers. The script should stop checking as soon as it finds a server that is down. The administrator writes a loop that iterates through a list of servers and checks each one. However, the script continues checking all servers even after finding one that is down. Which control structure modification would fix this?

    Select an answer first
  3. 23application · medium

    A firewall rule should allow a packet if it is from the trusted subnet (trusted = True) OR if it is from the VPN (vpn = True). However, the rule should NOT allow packets that are both from the trusted subnet and marked as suspicious (suspicious = True). Which boolean expression correctly implements this?

    Select an answer first
  4. 24application · easy

    A developer writes a Python script to read a configuration file. The code is: with open('config.txt') as f: data = f.read(). The script raises a FileNotFoundError. What is the most likely cause?

    Select an answer first
  5. 25application · easy

    A programmer is tracing through a function that calculates a discount. The function is: `def apply_discount(price, discount): return price * (1 - discount)`. The main program calls `apply_discount(100, 0.2)` and then prints the result. What is the output?

    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). “GFACT” is a trademark of its owner, used for identification only.