Develop a python code to accept two numbers from the user to check whether those number
are divisible by both 3 and 5 or not .
def checkDiv(num1, num2):
array = [num1, num2]
for i in array:
if i % 3 == 0 and i % 5 == 0:
print(i,' is divisible by both 3 and 5')
else:
print(i, 'is not divisible by both 3 and 5')
Comments
Leave a comment