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

WGU D335 Practice Test 2 With Questions And 100% SURE ANSWERS

Rating
5.0
(1)
Sold
1
Pages
6
Grade
A+
Uploaded on
16-10-2024
Written in
2024/2025

WGU D335 Practice Test 2 With Questions And 100% SURE ANSWERS

Institution
WGU D335
Module
WGU D335









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

Written for

Institution
WGU D335
Module
WGU D335

Document information

Uploaded on
October 16, 2024
Number of pages
6
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

JACKLINE


WGU D335 Practice Test 2 With Questions And 100% SURE ANSWERS


Terms in this set (15)


Create a solution that accepts three integer times_traveledA = int(input())
inputs representing the number of times an times_traveledB = int(input())
employee travels to a job site. Output the total times_traveledC = int(input())
distance traveled to two decimal places given employeeA = 15.62 #miles
the following miles per employee commute to employeeB = 41.85 #miles
the job site. Output the total distance traveled to employeeC = 32.67 #miles
two decimal places given the following miles per distance_traveledA = times_traveledA * employeeA
employee commute to the job site: distance_traveledB = times_traveledB * employeeB
Employee A: 15.62 miles distance_traveledC = times_traveledC * employeeC
Employee B: 41.85 miles total_miles_traveled = distance_traveledA + distance_traveledB + distance_traveledC
Employee C: 32.67 miles print('Distance: {:.2f} miles'.format(total_miles_traveled))

file_name = input()
Create a solution that accepts an input with open(file_name, 'r') as f:
identifying the name of a text file, for example, word1 = str(f.readline()).strip()
"WordTextFile1.txt". Each text file contains three word2 = str(f.readline()).strip()
rows with one word per row. Using the open() word3 = str(f.readline()).strip()
function and write() and read() methods, interact
with the input text file to write a new sentence f = open(file_name, 'r')
string composed of the three existing words to lines = f.read().splitlines()
the end of the file contents on a new line. Output lines = ' '.join(lines)


WGU
the new file contents. D335 Practice Test f.close()
2
print(f'{word1}\n{word2}\n{word3}\n{lines}')

1/6

, 10/16/24, 6:21 AM




ounces_per_pound = 16
pounds_per_ton = 2000
Create a solution that accepts an integer input number_ounces = int(input())
representing any number of ounces. Output the tons = number_ounces // (ounces_per_pound * pounds_per_ton)
converted total number of tons, pounds, and remaining_ounces = number_ounces % (ounces_per_pound * pounds_per_ton)
remaining ounces based on the input ounces pounds = remaining_ounces // ounces_per_pound
value. There are 16 ounces in a pound and 2,000 remaining_ounces = remaining_ounces % ounces_per_pound
pounds in a ton. print('Tons: {}'.format(tons))
print('Pounds: {}'.format(pounds))
print('Ounces: {}'.format(remaining_ounces))

Create a solution that accepts an input import csv
identifying the name of a CSV file, for example, input1 = input()
"input1.csv". Each file contains two rows of with open(input1, "r") as f:
comma-separated values. Import the built-in data = [row for row in csv.reader(f)]
module csv and use its open() function and for row in data:
reader() method to create a dictionary of even = [row[i].strip() for i in range(0, len(row), 2)]
key:value pairs for each row of comma- odd = [row[i].strip() for i in range(1, len(row), 2)]
separated values in the specified file. Output the pair = dict(zip(even, odd))
file contents as two dictionaries. print(pair)

Create a solution that accepts an integer input index_value = int(input())
representing the index value for any any of the name = various_data_types[index_value]
five elements in the following list: data_type = type(name).__name__
various_data_types = [516, 112.49, True, "meow", print(f"Element {index_value}: {data_type}")
("Western", "Governors", "University"), {"apple": 1,
"pear": 5}]
Using the built-in function type() and getting its
name by using the .name attribute, output data
type (e.g., int”, “float”, “bool”, “str”) based on the
input index value of the list element.




WGU D335 Practice Test 2
2/6

Reviews from verified buyers

Showing all reviews
1 year ago

5.0

1 reviews

5
1
4
0
3
0
2
0
1
0
Trustworthy reviews on Stuvia

All reviews are made by real Stuvia users after verified purchases.

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.
Queenstin University Of California - Los Angeles (UCLA)
Follow You need to be logged in order to follow users or courses
Sold
54
Member since
1 year
Number of followers
8
Documents
5752
Last sold
2 weeks ago
Tutor Queenstin

I am a professional writer/tutor. I help students with online class management ,exams ,essays ,assignments and dissertations . Improve your grades by buying my documents

3.2

5 reviews

5
2
4
0
3
1
2
1
1
1

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 exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight 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 smashed it. It really can be that simple.”

Alisha Student

Frequently asked questions