Python Forum
modulo and order of operations
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
modulo and order of operations
#2
25 * 3 = 75
75 % 4 = 3
100 - 3 = 97

Modulo has the same rank as * and /, so those operations are executed from left to right. And + or - go after them.
Reply


Messages In This Thread
modulo and order of operations - by freakbot - Dec-28-2016, 04:29 AM
RE: modulo and order of operations - by Hellerick - Dec-28-2016, 04:46 AM
RE: modulo and order of operations - by Mekire - Dec-28-2016, 04:47 AM
RE: modulo and order of operations - by freakbot - Dec-28-2016, 04:58 AM
RE: modulo and order of operations - by nilamo - Dec-28-2016, 10:30 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Replicate Excel operations with Python Lumberjack 3 1,888 May-10-2022, 01:44 AM
Last Post: Lumberjack
  Program demonstrates operations of bitwise operators without using bitwise operations ShawnYang 2 1,840 Aug-18-2021, 03:06 PM
Last Post: deanhystad
  Random Choice Operations Souls99 6 3,022 Jul-31-2020, 10:37 PM
Last Post: Souls99
  Create bot to automate operations in IQ Option JonatasCavalini 0 12,884 Jul-19-2020, 02:23 AM
Last Post: JonatasCavalini
  Two operations in two ranges salwa17 3 2,249 Jun-22-2020, 04:15 PM
Last Post: perfringo
  How to avoid slow cursor operations? sevensixtwo 0 1,886 Oct-11-2019, 02:23 PM
Last Post: sevensixtwo
  Operations on indexed variables in loop Fibulavie 1 1,962 Aug-14-2019, 06:07 AM
Last Post: fishhook
  Confused by order of operations ward 4 2,712 Jan-22-2019, 08:53 PM
Last Post: Larz60+
  Confused by this modulo equation VikramSuh 3 3,260 Sep-05-2018, 12:43 PM
Last Post: VikramSuh
  Beginner user: mathematical operations Mahdi1994 1 2,883 Mar-19-2018, 11:07 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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