WGU D335 Intro to Python | OA | Objective Assessment
| 15 Actual Questions and Answers | 2025 Update |
100% Correct.
, Create a solution that accepts an integer input representing a 9-digit unformatted student
identification number. Output the identification number as a string with no spaces.
The solution output should be in the format
111-22-3333 - answer-:student_id = int(input())
student_id >= 100000000 and student_id <= 999999999
part1 = student_id // 1000000
part2 = (student_id // 10000) % 100
part3 = student_id % 10000
formatted_id = f"{part1}-{part2}-{part3}"
print(formatted_id)
Create a solution that accepts an integer input to compare against the following list:
predef_list = [4, -27, 15, 33, -10]
Output a Boolean value indicating whether the input value is greater than the maximum value
from predef_list
The solution output should be in the format
Greater Than Max? Boolean_value - answer-:num = int(input())
boolean_value = False
max_value = max(predef_list)
if num > max_value:
boolean_value = True
print(f"Greater Than Max? {boolean_value}")
else:
print(f"Greater Than Max? {boolean_value}")
| 15 Actual Questions and Answers | 2025 Update |
100% Correct.
, Create a solution that accepts an integer input representing a 9-digit unformatted student
identification number. Output the identification number as a string with no spaces.
The solution output should be in the format
111-22-3333 - answer-:student_id = int(input())
student_id >= 100000000 and student_id <= 999999999
part1 = student_id // 1000000
part2 = (student_id // 10000) % 100
part3 = student_id % 10000
formatted_id = f"{part1}-{part2}-{part3}"
print(formatted_id)
Create a solution that accepts an integer input to compare against the following list:
predef_list = [4, -27, 15, 33, -10]
Output a Boolean value indicating whether the input value is greater than the maximum value
from predef_list
The solution output should be in the format
Greater Than Max? Boolean_value - answer-:num = int(input())
boolean_value = False
max_value = max(predef_list)
if num > max_value:
boolean_value = True
print(f"Greater Than Max? {boolean_value}")
else:
print(f"Greater Than Max? {boolean_value}")