Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions checks/variables/variables1.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# checks/variables/variables1.py
assert isinstance(a, int), "a should be an integer"
assert isinstance(b, float), "b should be a float"
assert isinstance(c, str), "c should be a string"
assert a == 0
assert b == 0.0
assert c == ""
assert a == 0, "a should be 0 — the default value from the exercise"
assert b == 0.0, "b should be 0.0 — a float, not an int"
assert c == "", "c should be an empty string"
print("variables1 ✓")
9 changes: 5 additions & 4 deletions checks/variables/variables2.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# checks/variables/variables2.py
sum_ab = a + b
diff_ab = a - b
product_ab = a * b
Expand All @@ -12,8 +13,8 @@
assert sum_ab == 13, "sum_ab should be 13"
assert diff_ab == 7, "diff_ab should be 7"
assert product_ab == 30, "product_ab should be 30"
assert quotient_ab == 3.3333333333333335
assert remainder_ab == 1
assert sum_ac == "10hello"
assert product_ac == "hellohellohello"
assert quotient_ab == 3.3333333333333335, "quotient_ab should be about 3.3333"
assert remainder_ab == 1, "remainder_ab should be 1"
assert sum_ac == "10hello", "sum_ac should be '10hello'"
assert product_ac == "hellohellohello", "product_ac should be 'hellohellohello'"
print("variables2 ✓")
Loading