Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Module help
#5
It's an order of operations error. The % operator evaluates with multiplication and division, as it is based on division. So 40 % 89 is calculated first, equaling 40, and then 40 is added to count. You need parens around the addition to force the order to what you want (doing the modulus after the addition).
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
Module help - by wak_stephanie - Jul-22-2018, 10:57 PM
RE: Module help - by micseydel - Jul-27-2018, 03:54 AM
RE: Module help - by perfringo - Jul-27-2018, 07:14 AM
RE: Module help - by ichabod801 - Jul-27-2018, 12:59 PM
RE: Module help - by Larz60+ - Jul-22-2018, 11:17 PM
RE: Module help - by wak_stephanie - Jul-22-2018, 11:33 PM
RE: Module help - by Larz60+ - Jul-22-2018, 11:41 PM
RE: Module help - by ichabod801 - Jul-23-2018, 12:42 AM
RE: Module help - by wak_stephanie - Jul-23-2018, 03:19 AM
RE: Module help - by ichabod801 - Jul-23-2018, 03:25 AM
RE: Module help - by wak_stephanie - Jul-23-2018, 03:34 AM
RE: Module help - by ichabod801 - Jul-23-2018, 01:49 PM
Module help - by stangerbot342 - Jul-26-2018, 09:57 PM

Forum Jump:

User Panel Messages

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