PythiloLesson 4 of 30 · progress kept in this browser

Numbers

int has no size limit. float is a 64-bit binary fraction, so most decimals are stored only approximately.

print(7 / 2)    # 3.5, always a float
print(7 // 2)   # 3
print(-7 // 2)  # -4, rounds down
print(7 % 2)    # 1
print(2 ** 100) # exact, however large
print(divmod(7, 2))  # (3, 1)
Your task

Write split_bill(total_cents, people) returning (share, left_over) in whole cents. Write almost_equal(a, b) using math.isclose with abs_tol=1e-9.