• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 14 pages
Exam (elaborations)

WGU E010 FoUndations oF ProGramminG (Python) PracticE QUEstions

Document preview thumbnail
Preview 2 out of 14 pages

WGU E010 FoUndations oF ProGramminG (Python) PracticE QUEstions

Content preview

WGU E010 FoUndations oF
ProGramminG (Python) PracticE
QUEstions
sEction 1: VariablEs, data tyPEs,
and basic syntax (QUEstions 1–15)
1. What is the output of print(type()) in Python?

A. <class 'int'>
B. <class 'float'>
C. <class 'double'>
D. <class 'str'>

Answer: B
Rationale: In Python, the / operator performs true division and always returns a float, even
when numbers divide evenly. = 5.0, so type(5.0) is <class 'float'> .

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

A. 2nd_place
B. my_var
C. my-var
D. class

Answer: B
Rationale: Python variable names must start with a letter or underscore, cannot contain
hyphens, and cannot be reserved keywords. 2nd_place starts with a digit, my-var contains a
hyphen, and class is a reserved keyword .

3. What is the data type of the value 3.14 in Python?

A. int
B. float
C. string
D. Boolean

Answer: B
Rationale: Numbers with a decimal point are of type float (floating-point). Integers have no
decimal point .

, 4. Given x = 5 and y = 2, what is the result of x // y?

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

Answer: B
Rationale: The floor division operator // returns the integer quotient and discards the
remainder. 5 // 2 = 2 .

5. Which operator is used to check if two values are equal in Python?

A. =
B. ==
C. !=
D. ===

Answer: B
Rationale: == is the equality comparison operator. = is assignment. != means not equal. ===
is not valid in Python .

6. What is the output of print(type(10))?

A. <class 'int'>
B. <class 'integer'>
C. 'int'
D. <int>

Answer: A
Rationale: The type() function returns the type object; printing it displays <class 'int'> .

7. What will the following code output? print(3 + 2 * 4)

A. 20
B. 14
C. 11
D. 24

Answer: C
Rationale: Operator precedence: multiplication before addition. 2 * 4 = 8, then 3 + 8 = 11 .

8. Which correctly converts the string "123" to an integer?

A. int("123")
B. integer("123")
C. str(123)
D. float("123")

Document information

Uploaded on
November 2, 2026
Number of pages
14
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$22.49

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.
WORLDNURSETEST
4.0
(265)
Sold
154
Followers
61
Items
3254
Last sold
4 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