Number sign
Write a function that takes two integers as input and returns "Positive" if both are positive, "Negative" if both are negative, and "Mixed" otherwise.
Complete Listing 1. Save the completed code as check_number_sign.py and run it to check the supplied assertions.
def check_number_sign(num1: int, num2: int) -> str:
raise NotImplementedError("Replace this line with your code.")
# Both positive
got = check_number_sign(5, 3)
assert got == "Positive", f"5, 3: expected 'Positive', got {got!r}"
# Both negative
got = check_number_sign(-2, -4)
assert got == "Negative", f"-2, -4: expected 'Negative', got {got!r}"
# One of each
got = check_number_sign(7, -1)
assert got == "Mixed", f"7, -1: expected 'Mixed', got {got!r}"
# Zero is neither positive nor negative
got = check_number_sign(0, 5)
assert got == "Mixed", f"0, 5: expected 'Mixed', got {got!r}"
# Your case: which pair is most likely to break it?
# got = check_number_sign(___, ___)
# assert got == "___", f"___: expected '___', got {got!r}"
TipHint
assert conditionchecks a Boolean condition. A true condition produces no output; a false condition raisesAssertionError. For example,assert 2 + 3 == 5passes.