Skip to content
Aabha AI Academy
Skip to reading

Python

01 Values

# 1A: Calculate 4 items at 175 cents each.
quantity = 4
unit_price_cents = 175
total = None  # TODO: replace None with an expression.
assert total == 700
# 1B: Split 135 minutes into whole hours and leftover minutes.
hours = None
minutes_left = None
assert (hours, minutes_left) == (2, 15)
# 1C: Convert raw to an integer, add 3, and normalize topic.
raw = "7"
topic = " Data "
result = None
normalized = None
assert result == 10 and normalized == "data"
print("Module 1 checks passed")

Download this source file