Python's arithmetic operators are + (addition), - (subtraction), * (multiplication), / (true division), // (floor division), % (remainder, called modulo) and ** (exponentiation). The PCEP exam loves these, especially the three division-related ones, so you need to predict both the value and the type of every result. Getting the type right is half the answer, because 3 and 3.0 print differently.
Keep reading for free
Create a free StudyToCert account to read the rest of this lesson: 7 more sections, 6 key terms, a real-world example, an exam tip and self-check questions. Every lesson, lab and practice test is free with an account.