Assignment 4 divisible by three
I need a little help. I do not understand what I am doing wrong. I keep getting this message in the picture included.
n = int(input("How many numbers do you need to check? "))
divisible = 0
notdivisible = 0
for x in range(n):
num = int(input("Enter number: "))
if num % 3== 0:
divisible += 1
print(str(num)+" is divisible by 3.")
else:
num % 3== 0
notdivisible += 1
print(str(num)+" is not divisible by 3.")
print("You entered "+str(divisible )+" number(s) that are divisible by 3.")
print("You entered "+str(notdivisible )+" number(s) that are not divisible by 3.")
n = int(input("How many numbers do you need to check? "))
divisible = 0
notdivisible = 0
for x in range(n):
num = int(input("Enter number: "))
if num % 3== 0:
divisible += 1
print(str(num)+" is divisible by 3.")
else:
num % 3== 0
notdivisible += 1
print(str(num)+" is not divisible by 3.")
print("You entered "+str(divisible )+" number(s) that are divisible by 3.")
print("You entered "+str(notdivisible )+" number(s) that are not divisible by 3.")