Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
modulus and operator
#1
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
Reply
#2
What have you tried?
I don't think you need modulus at all for this.
Reply
#3
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.
Reply
#4
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?
Reply
#5
well, that would give 50. 50 is the remainder?

I solved the problem thank you
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020