Number" )
number = int(number)
if number //2 and number //3:
print ("BOTH")
elif number //2 or number //3:
print ("ONE")
else:
print ("NEITHER")
is this true?
In the first condition, I want the number 3 and 2 to be divisible by the number that the user enters
In the latter condition only one of the numbers
At the end of none
what's wrong?
Please format the code you posted, by wrapping it in triple backticks. -> `
Wrong logic
you maybe want to use modulo % instead of floor division //
Use gist or one of the code sharing websites then paste the link here.
Обсуждают сегодня