+ 1
Another problem
same program as the last question, but I don't understand why it is outputing the numbers it is https://code.sololearn.com/cQ81mRpKlBfy/?ref=app
9 Answers
+ 4
num //= 10 will do integer divide
+ 4
It takes time and practice to be good at everything in life. Python is no difference.
+ 1
num /= 10
This line will make Python automatically convert num from an integer to a floating point number.
Try replacing the line with this to convert it back into an integer (cutting off all digits behind the comma):
num = int(num/10)
Is this the result you want?
+ 1
ok, thanks
+ 1
yeah it did, I have since written a few codes that used that actually!
+ 1
they are still WIP though
0
I am so bad at python...
0
Oh, integer division. I haven't used Python in a while, sorry :)
But I hope that my explanation helped a bit.
0
Please i am a completely novice in all area, how can i get started?