I am new to Python. I have learned the If else statement, sto this exercise has to be with the If else and not with something more.
Write a program which asks the user to type an integer and then prints "Yes" if that integer is divisible by 3, otherwise prints "No"
My code is this:
user_input = input("Type an integer: ")
user_int = int(user_input)
if user_int / 3:
print("Yes)
else:
print("No")
I think I messed up the if
statement, but really I cannot figure it out.