Python Forum

Full Version: modulus and operator
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
without giving me code how would I use the modulus and floor division to find the minimum about to make up total value
ex: 250 would 2 100s and 1 50s
50 would be 0 100s and 1 50s
What have you tried?
I don't think you need modulus at all for this.
for the assignment, I have to. I have used floor division to divide it by the value
ex: 250// 50 = 5 50s but I need it to show 1 50s how would I do that.
I think you're thinking too much about the code. Take a step back, and think what modulus means. If you do 250 mod 100, what do you get, and what does that mean?
well, that would give 50. 50 is the remainder?

I solved the problem thank you