100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

WGU D335 Practice Test 2 Question and answers verified to pass

Rating
-
Sold
-
Pages
15
Grade
A+
Uploaded on
07-04-2025
Written in
2024/2025

WGU D335 Practice Test 2 Question and answers verified to pass

Institution
WGU D335 Practice
Course
WGU D335 Practice









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
WGU D335 Practice
Course
WGU D335 Practice

Document information

Uploaded on
April 7, 2025
Number of pages
15
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

WGU D335 Practice
Test 2
1. Create a solution that accepts three
times_traveledA =
integer inputs representing the
int(input()) times_traveledB
number of times an employee
= int(input())
travels to a job site. Output the times_traveledC =
int(input())
total distance traveled to two decimal places employeeA =
15.62 #miles given the following miles per employee com-
employeeB = 41.85 #miles mute to the job site. Output the
total distance employeeC = 32.67 #miles
traveled to two decimal places given the distance_traveledA =
fol- lowing miles per employee times_traveledA * employeeA
commute to the job site: distance_traveledB =
Employee A: 15.62 times_traveledB * employeeB
miles Employee B: distance_traveledC =
41.85 miles Employee times_traveledC * employeeC
C: 32.67 miles total_miles_traveled =
distance_travele- dA +
distance_traveledB + distance_trav-
eledC
print('Distance: {:.2f}
miles'.format(to-
tal_miles_traveled))
2. Create a solution that accepts an input
iden- tifying the name of a text file, for file_name = input()
example, "WordTextFile1.txt". Each with open(file_name, 'r') as f:
text file contains three rows with one word1 = str(f.readline()).strip()
word per row. Using the open() word2 = str(f.readline()).strip()
function and write() and read() meth- word3 = str(f.readline()).strip()
ods, interact with the input text file to
write a new sentence string composed f = open(file_name, 'r')
of the three
existing words to the end of the file contents lines = f.read().splitlines()
1/
15

, WGU D335 Practice
Test 2
on a new line. Output the new file lines = ' '.join(lines)
contents. f.close()
print(f'{word1}\n{word2}\n{word3
n{lines

3. Create a solution that accepts an ounces_per_pound = 16
integer input representing any pounds_per_ton = 2000
number of ounces.




2/
15

Get to know the seller

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.
LEWISSHAWN55 Yale University
View profile
Follow You need to be logged in order to follow users or courses
Sold
87
Member since
2 year
Number of followers
46
Documents
7223
Last sold
1 week ago
THE SHOP FOR EXAMS,TESTBANKS,AQA, WHAT YOU STUDY AND WISH TO PASS THEN COME AND CHECK FOR YOUR NEED ......

WANT TO PASS YOUR EXAMS??? IF YES CHECK OUT MY ACCOUNT FOR ALL YOUR EXAMS NEED BE IT NURSING,REALTORS, HUMAN RESOURCE,MATHS,BIOLOGY,WGU,ICT, YOU BETTER CHECK MY ACCOUNT FOR MORE IF YOU GET WHAT U WANT THEN FEEL FREE TO PURCHASE AT A BETTER PRICE........

3.1

10 reviews

5
5
4
0
3
0
2
1
1
4

Recently viewed by you

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

Frequently asked questions