Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 4 out of 114 pages
Exam (elaborations)

WGU E010 Foundations of Programming Python OA Prep | 2026 Updated Practice Bank

Document preview thumbnail
Preview 4 out of 114 pages

Conquer your Western Governors University objective assessment with this fully updated 2026 practice test bank for WGU E010 Foundations of Programming (Python). This premium preparatory resource delivers rigorous questions and verified code solutions covering core programming logic, variables, loops, conditional statements, functions, and data structures. Every technical question features a clear structural syntax breakdown and logical rationale to help you write cleaner code and pass your OA with absolute confidence.

Content preview

WGU E010 Foundations of Programming (Python) –
2026 UPDATED OA

Complete Practice Questions 1-200




SECTION 1: PYTHON BASICS & SYNTAX (Questions 1-30)

QUESTION 1
What is the correct way to print "Hello World" in Python?

A. print("Hello World")
B. printf("Hello World")
C. echo "Hello World"
D. console.log("Hello World")




Correct Answer: A. print("Hello World")

*Rationale: * In Python, print() is the built-in function used to output text to the
console. printf() is used in C, echo is used in PHP and shell scripting,
and console.log() is used in JavaScript.




QUESTION 2
Which of the following is a valid variable name in Python?

A. 2nd_number
B. my_var

,C. my-var
D. class




Correct Answer: B. my_var

*Rationale: * Python variable names must start with a letter or underscore, followed by
letters, numbers, or underscores. They cannot start with a number (A), cannot contain
hyphens (C), and cannot be Python reserved keywords such as class (D).




QUESTION 3
What data type is the value 3.14 in Python?

A. int
B. float
C. str
D. bool




Correct Answer: B. float

*Rationale: * In Python, numbers with decimal points are float data types. Integers
have no decimal point. 3.14 is a float.




QUESTION 4
Which operator is used to concatenate strings in Python?

A. +
B. *

,C. &
D. |




*Correct Answer: A. +

*Rationale: * The + operator is used to concatenate (join) strings together in Python. For
example, "Hello " + "World" results in "Hello World".




QUESTION 5
What is the result of 5 // 2 in Python?

A. 2.5
B. 2
C. 3
D. 2.0




*Correct Answer: B. 2

*Rationale: * The // operator performs floor division, which returns the integer
quotient, discarding the remainder. 5 // 2 = 2.




QUESTION 6
What is the result of 5 % 2 in Python?

A. 1
B. 2

, C. 2.5
D. 0




*Correct Answer: A. 1

*Rationale: * The % operator returns the remainder of a division operation. 5 % 2 = 1
because 5 divided by 2 equals 2 with a remainder of 1.




QUESTION 7
Which of the following is the correct way to comment multiple lines in Python?

A. /* This is a comment */
B. // This is a comment
C. # This is a comment
D. """ This is a comment """




*Correct Answer: D. """ This is a comment """

*Rationale: * In Python, single-line comments use #. Multi-line comments can be
created using triple quotes """ or '''. Options A and B are used in other programming
languages like C and JavaScript.




QUESTION 8
What is the output of type(True) in Python?

A. <class 'int'>
B. <class 'bool'>

Document information

Uploaded on
July 27, 2026
Number of pages
114
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$33.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
CornelWest
3.7
(248)
Sold
1565
Followers
1128
Items
12128
Last sold
3 days ago


Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions