Looking for reliable answers? Westonci.ca is the ultimate Q&A platform where experts share their knowledge on various topics. Join our Q&A platform and get accurate answers to all your questions from professionals across multiple disciplines. Connect with a community of professionals ready to provide precise solutions to your questions quickly and accurately.

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.")

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 IntinputHow class=

Sagot :