I creating a code for my homework and I was using python as my language but there’s something I don’t understand in the this example code output:
def numbers (num):
remove = str(num)[:-1]
remove += str(int(remove) %7)
return int(remove) == num
numb = int (input(“Enter a 6 Digit Number: “))
print(numbers(numb))
The part I don’t understand is why does it say true when I input: 123454
still learning about python I hope someone can help me with this (sorry for the bad english)
New contributor
Shamble is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.