Calculate Double or Triple
Write a Python program of Calculate Double or Triple. It consists of two test cases
The below link contains Calculate Double or Triple - Question, explanation and test cases
https://drive.google.com/file/d/1KhGDfF3F_z2lSwKOmcNZYqBCEW67WXm8/view?usp=sharing
We need all test caese can be come while code was running
num = int(input("Enter a number:"))
check = num % 3
if check==0:
b = 3 * num
print(b)
else:
b = 2 * num
print(b)
Comments
Leave a comment