EXAM COVERAGE - WGU D335: Introduction to Programming in
Python
The WGU D335 Introduction to Programming in Python exam
evaluates foundational knowledge of Python programming concepts
and problem-solving using code. Key topics include basic Python
syntax, variables, data types, and operators, as well as input/output
operations and program structure. The exam covers control flow
statements, including conditional statements (if, elif, else) and loops
(for and while). Candidates are tested on functions, parameters, and
return values, along with string manipulation and basic data structures
such as lists and dictionaries. Additional areas include debugging
techniques, reading and interpreting Python code, and writing simple
,programs to solve computational problems. The exam emphasizes
logical thinking, coding accuracy, and applying programming
concepts to create functional Python programs. 💻
, Create a solution that accepts an integer input representing any
number of ounces. Output the converted total number of tons,
pounds, and remaining ounces based on the input ounces value. There
are 16 ounces in a pound and 2,000 pounds in a ton.
The solution output should be in the format
Tons: value_1 Pounds: value_2 Ounces: value_3
ounces = int(input())
value_1 = ounces // (16 * 2000)
value_2 = (ounces % (16 * 2000)) // 16
value_3 = ounces % 16
print(f"Tons: {value_1}")
print(f"Pounds: {value_2}")
print(f"Ounces: {value_3}")