x = int(input(“How many numbers do you need to check? “))
d3 = 0
nd3 = 0
for i in range(x):
number = int(input(“Enter number: “))
check = number % 3
if check == 0:
print(f”{number} is divisible by 3.”)
d3 += 1
else:
print(f”{number} is not divisible by 3.”)
nd3 += 1
print(f”You entered {d3} number(s) that are divisible by 3.”)
print(f”You entered {nd3} number(s) that are not divisible by 3.”)
Leave a Reply