WGU D335
WGU D335 Intro To Python | OA | Objective
Assessment | 15 Actual Questions And Answers | 2025
Update | 100% Correct.
1 of 14
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.
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
I_V = int(input())
if -1 <= I_V < len(various_data_types):
element = various_data_types [I_V]
D_T_N = str(type(element)).split("'")[1]
print(f' Element {I_V}: {D_T_N}')
commute = {
'Employee A': 15.62,
'Employee B': 41.85,
'Employee C': 32.67
}
travels = {
'Employee A': int(input()),
'Employee B': int(input()),
'Employee C': int(input())
}
t_d_t = sum(commute[employee]*travels[employee] for employee in travels)
print(f'Distance: {t_d_t:.2f} miles')
base_1 = int(input())
base_2 = int(input())
height = int(input())
area = 0.5 (base_1 + base_2) height
print(f'Trapezoid area: {area:.1f} square meters')
, input1 = int(input())
input2 = int(input())
input3 = int(input())
input4 = int(input())
input5 = int(input())
intger_sum = input1 + input2 + input3 + input4 + input5
float_sum = float(input1 + input2 + input3 + input4 + input5)
string_sum = str(input1) + str(input2) + str(input3) + str(input4) + str(input5)
print(f'Integer: {intger_sum}')
print(f'Float: {float_sum}')
print(f'String: {string_sum}')
2 of 14
Definition
id_num = int(input())
format_id_num = f'{id_num // 1000000}-{(id_num // 10000) % 100}-{id_num
% 10000:04d}'
print(format_id_num)
Task:
Create a solution that accepts an integer input. Im͘port the built-in m͘odule m͘ath and
use its factorial() m͘ethod to calculate the factorial of the integer input. Output the
value of the factorial, as well as a Boolean value identifying whether the factorial
output is greater than 100.
The solution output should be in the form͘at
factorial_value Boolean_value
WGU D335 Intro To Python | OA | Objective
Assessment | 15 Actual Questions And Answers | 2025
Update | 100% Correct.
1 of 14
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.
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
I_V = int(input())
if -1 <= I_V < len(various_data_types):
element = various_data_types [I_V]
D_T_N = str(type(element)).split("'")[1]
print(f' Element {I_V}: {D_T_N}')
commute = {
'Employee A': 15.62,
'Employee B': 41.85,
'Employee C': 32.67
}
travels = {
'Employee A': int(input()),
'Employee B': int(input()),
'Employee C': int(input())
}
t_d_t = sum(commute[employee]*travels[employee] for employee in travels)
print(f'Distance: {t_d_t:.2f} miles')
base_1 = int(input())
base_2 = int(input())
height = int(input())
area = 0.5 (base_1 + base_2) height
print(f'Trapezoid area: {area:.1f} square meters')
, input1 = int(input())
input2 = int(input())
input3 = int(input())
input4 = int(input())
input5 = int(input())
intger_sum = input1 + input2 + input3 + input4 + input5
float_sum = float(input1 + input2 + input3 + input4 + input5)
string_sum = str(input1) + str(input2) + str(input3) + str(input4) + str(input5)
print(f'Integer: {intger_sum}')
print(f'Float: {float_sum}')
print(f'String: {string_sum}')
2 of 14
Definition
id_num = int(input())
format_id_num = f'{id_num // 1000000}-{(id_num // 10000) % 100}-{id_num
% 10000:04d}'
print(format_id_num)
Task:
Create a solution that accepts an integer input. Im͘port the built-in m͘odule m͘ath and
use its factorial() m͘ethod to calculate the factorial of the integer input. Output the
value of the factorial, as well as a Boolean value identifying whether the factorial
output is greater than 100.
The solution output should be in the form͘at
factorial_value Boolean_value