WGU D335 INTRODUCTION TO PROGRAMMING IN PYTHON: OBJECTIVE
ASSESSMENT OA NEWEST 2026 ACTUAL EXAM QUESTIONS AND CORRECT
ANSWERS (VERIFIED SOLUTIONS) GRADED A+ | BRAND NEW 2026/2027 |
100% GUARANTEED PASS | WGU
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. 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
The solution output should be in the format
Distance: total_miles_traveled miles - ✔✔✔ Correct Answer > travels =
{
"A": int(input()),
"B": int(input()),
"C": int(input())
}
,2 | Page
miles_per_employee = {"A": 15.62, "B":41.85, "C": 32.67}
total_miles_traveled = sum(travels[employee] *
miles_per_employee[employee] for employee in travels)
print(f"Distance: {total_miles_traveled:.2f} miles")
Create a solution that accepts any three integer inputs representing the
base (b1, b2) and height (h) measurements of a trapezoid in meters.
Output the exact area of the trapezoid in square meters as a float value.
The exact area of a trapezoid can be calculated by finding the average of
the two base measurements, then multiplying by the height
measurement.
Trapezoid Area Formula:A = [(b1 + b2) / 2] * h
The solution output should be in the format
Trapezoid area: area_value square meters - ✔✔✔ Correct Answer > b1
= int(input()) b2 = int(input()) h = int(input())
area_value = float((b1 + b2) /2) * h
print(f"Trapezoid area: {area_value} square meters")
Create a solution that accepts five integer inputs. Output the sum of the
five inputs three times, converting the inputs to the requested data
type prior to finding the sum.
, 3 | Page
First output: sum of five inputs maintained as integer values
Second output: sum of five inputs converted to float values
Third output: sum of five inputs converted to string values
(concatenate)
The solution output should be in the format
Integer: integer_sum_value Float: float_sum_value String:
string_sum_value - ✔✔✔ Correct Answer > num1 = int(input()) num2
= int(input()) num3 = int(input()) num4 = int(input()) num5 =
int(input())
integer_sum_value = num1 + num2 + num3 + num4 + num5
float_sum_value = float(num1) + float(num2) + float(num3) +
float(num4) + float(num5)
string_sum_value = str(num1) + str(num2) + str(num3) + str(num4) +
str(num5)
print(f"Integer: {integer_sum_value}") print(f"Float:
{float_sum_value}") print(f"String:
{string_sum_value}")
Create a solution that accepts an integer input representing the index
value for any any of the five elements in the following list:
various_data_types = [516, 112.49, True, "meow", ("Western",