Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

WGU D335 Intro to Python | OA | Objective Assessment | 15 Actual Questions and Answers Plus Rationales | 2026 Update | 100% Correct

Beoordeling
-
Verkocht
-
Pagina's
31
Cijfer
A+
Geüpload op
29-01-2026
Geschreven in
2025/2026

WGU D335 Intro to Python | OA | Objective Assessment | 15 Actual Questions and Answers Plus Rationales | 2026 Update | 100% Correct

Instelling
WGU D335 Intro To Python
Vak
WGU D335 Intro to Python

Voorbeeld van de inhoud

WGU D335 Intro to Python | OA |
Objective Assessment | 15 Actual
Questions and Answers Plus Rationales |
2026 Update | 100% Correct
1. Which line correctly assigns an integer value to a variable?
A. x = "5"
B. x == 5
C. x = 5
D. int x = 5

Answer: C
Rationale: Python assigns values using a single equals sign and does not require type
declarations.



2. What is the data type of 3.14?
A. int
B. float
C. str
D. bool

Answer: B
Rationale: Decimal numbers are stored as floats.



3. Which function converts user input into an integer?
A. input()
B. str()
C. int()
D. float()

Answer: C
Rationale: input() returns a string, which must be cast to int.



4. What is the output of this code?

,x = 10
y = "10"
print(x + int(y))

A. 1010
B. 20
C. Error
D. "20"

Answer: B
Rationale: y is converted to an integer before addition.



5. Which is a Boolean value?
A. "True"
B. 1
C. True
D. "False"

Answer: C
Rationale: Boolean values are True or False without quotes.

5. Which is a Boolean value in Python?
A. "True"
B. 1
C. True
D. "False"

Answer: C
Rationale: Boolean values in Python are True and False without quotation marks.



6. What is the output of this code?

x = 10
y = "10"
print(x + int(y))

A. 1010
B. 20
C. Error
D. "20"

Answer: B
Rationale: The string "10" is converted to an integer, allowing numeric addition.

,7. Which function converts user input into an integer?
A. input()
B. str()
C. int()
D. float()

Answer: C
Rationale: input() returns a string, which must be converted using int().



8. What is the data type of the value returned by input()?
A. int
B. float
C. string
D. boolean

Answer: C
Rationale: All user input is returned as a string by default.



9. Which line of code correctly assigns an integer to a variable?
A. x == 5
B. x = "5"
C. x = 5
D. int x = 5

Answer: C
Rationale: Python uses = for assignment and does not require type declarations.



10. What happens when this code runs?

age = input("Enter age: ")
print(age + 1)

A. Prints the next age
B. Correct output
C. TypeError
D. SyntaxError

, Answer: C
Rationale: age is a string, and Python cannot add a string and an integer.



11. Which line correctly prints text and a variable together?
A. print("x")
B. print(x)
C. print("Value:", x)
D. print(Value x)

Answer: C
Rationale: Commas allow combining strings and variables in print().



12. What symbol is used for comments in Python?
A. //
B. #
C. /* */
D. --

Answer: B
Rationale: Python uses # to indicate comments.



13. What is the output of this code?

print("Hello", "World")

A. HelloWorld
B. Hello World
C. "Hello World"
D. Error

Answer: B
Rationale: A space is automatically inserted between comma-separated values.



14. Which function displays output to the screen?
A. input()
B. print()
C. output()
D. show()

Geschreven voor

Instelling
WGU D335 Intro to Python
Vak
WGU D335 Intro to Python

Documentinformatie

Geüpload op
29 januari 2026
Aantal pagina's
31
Geschreven in
2025/2026
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

$22.49
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
GradeBoostAcademy Chamberlain College Nursing
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
232
Lid sinds
1 jaar
Aantal volgers
5
Documenten
3067
Laatst verkocht
2 dagen geleden

3.9

19 beoordelingen

5
8
4
6
3
3
2
0
1
2

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen