Limited-Time Offer: Enjoy 50% Savings! - Ends In 0d 00h 00m 00s Coupon code: 50OFF
Welcome to QA4Exam

Exam preparation

WGU Foundations-of-Programming-Python Exam Guide for the Courses and Certifications

Foundations-of-Programming-Python is the WGU Foundations of Programming (Python) exam, part of the WGU Courses and Certifications certification. The official outline has 5 exam topics. 11 free practice questions with explanations are online, and each exam topic below links to the ones written for it.

Foundations-of-Programming-Python Exam Details

Vendor
WGU
Exam Code
Foundations-of-Programming-Python
Free Practice Questions
11
Full Question Set
60
Exam Topics
5
Last Updated
December 2, 2026
Exam Name
Foundations of Programming (Python)
Certification
WGU Courses and Certifications

Foundations-of-Programming-Python Exam Topics and Weights

Variables, Data Types, and Basic Operations

What this topic covers

Assign values to variables and distinguish strings, numbers, and booleans. Convert input strings to numeric types for arithmetic, while keeping original values when they are needed for records.

Why does int('3.7') raise an error while float('3.7') works?

The int function only accepts text that looks like a whole number, so '3.7' causes a ValueError. Use float('3.7') to get 3.7, then int() on that float if you want to drop the decimal part.

2 free Foundations-of-Programming-Python practice questions on Variables, Data Types, and Basic Operations

Control Flow and Decision Making

What this topic covers

Use if, elif, and else to apply rules in the right order, including nested conditional expressions. Combine comparisons with and, or, and not to test requirements such as multiple conditions being true.

When an if is followed by elif, which branch runs if both conditions are true?

Only the first branch whose condition is true runs. Python checks the if, then each elif in order, and skips the rest once one matches. If score is 95, both score >= 90 and score >= 80 pass, but only the first message prints.

2 free Foundations-of-Programming-Python practice questions on Control Flow and Decision Making

Loops and Iteration

What this topic covers

Use for and while loops to process sequences and repeated readings. Apply break to stop processing when a condition is met, or continue to skip an iteration.

How do break and continue differ inside a for or while loop?

break exits the whole loop right away, while continue skips the rest of the current pass and moves to the next item. A loop that uses break on zero stops before processing later readings, which is what you want when zero marks the end of the data.

2 free Foundations-of-Programming-Python practice questions on Loops and Iteration

Functions and Modular Programming

What this topic covers

Define functions with parameters and default values, then return results for callers to use. Keep calculations local so each call can work independently without shared state.

Which value does a default parameter like rate=0.08 use when the caller omits it?

Python uses the default value 0.08 for that parameter inside the function. A caller can still pass a different rate to override it. Defaults are evaluated once, when the def statement runs, so avoid mutable defaults such as an empty list.

2 free Foundations-of-Programming-Python practice questions on Functions and Modular Programming

Data Structures and Input/Output

What this topic covers

Choose lists, tuples, or dictionaries to organize Python data, and use input and output operations to process it. Read files without changing them, write results to files, and track totals as data is processed.

Why open a file with 'w' mode instead of 'r' when writing results?

Mode 'w' creates the file if it is missing and replaces any existing contents. Mode 'r' only reads, and it raises an error if the file does not exist. Open the input in 'r' and the output in 'w' so the source data is never overwritten.

3 free Foundations-of-Programming-Python practice questions on Data Structures and Input/Output

Related WGU Exams

Continue to Free Foundations-of-Programming-Python Exam Questions