cs/practical-file/outputs/question_18_output.txt
2025-06-24 02:37:47 +05:30

18 lines
393 B
Plaintext

Question 18:
Write a Python program to accept two numbers and check whether they are equal or not
Answer:
def main(num1: int, num2: int) -> None:
if num1 == num2:
print(f"{num1} and {num2} are equal.")
else:
print(f"{num1} and {num2} are not equal.")
if __name__ == '__main__':
main(10, 10)
main(10, 20)
Output:
10 and 10 are equal.
10 and 20 are not equal.