100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten 4.2 TrustPilot
logo-home
Tentamen (uitwerkingen)

WGU D335 PRACTICE TEST 2 (PRACTICE QUESTIONS WITH ANSWERS FOR PA) EXAM QUESTIONS AND CORRECT ANSWERS PLUS RATIONALES | GRADED A+ | VERIFIED ANSWERS | BRAND NEW VERSION!

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

WGU D335 PRACTICE TEST 2 (PRACTICE QUESTIONS WITH ANSWERS FOR PA) EXAM QUESTIONS AND CORRECT ANSWERS PLUS RATIONALES | GRADED A+ | VERIFIED ANSWERS | BRAND NEW VERSION!

Instelling
WGU D335
Vak
WGU D335










Oeps! We kunnen je document nu niet laden. Probeer het nog eens of neem contact op met support.

Geschreven voor

Instelling
WGU D335
Vak
WGU D335

Documentinformatie

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

Onderwerpen

Voorbeeld van de inhoud

WGU D335 PRACTICE TEST 2 (PRACTICE QUESTIONS WITH ANSWERS
FOR PA) EXAM QUESTIONS AND CORRECT ANSWERS PLUS
RATIONALES | GRADED A+ | VERIFIED ANSWERS | BRAND NEW
VERSION!
Question 1
Create a solution that accepts three integer inputs representing the number of times an
employee travels to a job site. Output the total distance traveled to two decimal places given
the following miles per employee commute to the job site:

• Employee A: 15.62 miles

• Employee B: 41.85 miles

• Employee C: 32.67 miles

times_traveledA = int(input())

times_traveledB = int(input())

times_traveledC = int(input())




# Calculate total distance and format the output

# Your code here# Calculate total distance and format the output

# Your code here

Which code snippet correctly completes the solution?
A)

codePython

total_miles_traveled = (times_traveledA * 15.62) + (times_traveledB * 41.85) +
(times_traveledC * 32.67)

print(f'Distance: {total_miles_traveled} miles')

B)

,codePython

total_miles_traveled = (times_traveledA * 15.62) + (times_traveledB * 41.85) +
(times_traveledC * 32.67)

print('Distance: {:.2f} miles'.format(total_miles_traveled))

C)

codePython

total_miles_traveled = (times_traveledA + 15.62) + (times_traveledB + 41.85) +
(times_traveledC + 32.67)

print('Distance: {:.2f} miles'.format(total_miles_traveled))

```D)

```python

total_miles_traveled = int(times_traveledA * 15.62) + int(times_traveledB * 41.85) +
int(times_traveledC * 32.67)

print('Distance: {:.2f} miles'.format(total_miles_traveled))

Correct Answer: B)
Rationale: This option correctly multiplies the number of trips for each employee by their
respective commute distance and then sums the results. It also correctly uses
the .format() method with the :.2f specifier to format the final output to exactly two decimal
places as required.




Question 2
Create a solution that accepts an input identifying the name of a text file. Each text file
contains three rows with one word per row. Using file handling methods, write a new
sentence string composed of the three existing words to the end of the file contents on a new
line. Output the new file contents.

, codePython

file_name = input()



# Your code here to read the words, append the sentence, and print the new content

```**Which code snippet correctly completes the solution?**

A)

```python

with open(file_name, 'r') as f:

words = f.read().splitlines()

sentence = ' '.join(words)

with open(file_name, 'a') as f:

f.write('\n' + sentence)

with open(file_name, 'r') as f:

print(f.read())

B)

codePython

with open(file_name, 'w') as f:

words = f.readlines()

f.write(' '.join(words))

print(open(file_name, 'r').read())

C)

codePython

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.
DoctorGriffin Maryland University
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
2724
Lid sinds
4 maanden
Aantal volgers
17
Documenten
1078
Laatst verkocht
1 dag geleden

4,9

178 beoordelingen

5
165
4
12
3
0
2
0
1
1

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

Veelgestelde vragen