Course Content
Paper 2 – Problem Solving Approach -Practical
0/102
Past Paper-2 May/June 2025
Past Paper-1 May/June 2025
Download Files
0/1
Olevel : Computer Science 2210 / IGCSE 0478 : Recorded

Process: Arithmetic Operators

Reading: Read content other than video. 

Arithmetic operators in programming are symbols or functions that perform mathematical operations on operands. These operators include addition (+), subtraction (-), multiplication (*), division (/), modulus (%), and exponentiation (**). Here’s how each operator works with examples:

Addition (+): Adds two operands(values)

a = 5
b = 3
result = a + b # result will be 8

Subtraction (-): Subtracts the right operand from the left operand.

a = 10
b = 4
result = a – b # result will be 6

Multiplication (*): Multiplies two operands.

a = 6
b = 7
result = a * b # result will be 42

Division (/): Divides the left operand by the right operand (results in a float).

a = 10
b = 3
result = a / b # result will be 3.3333333333333335

Modulus (%): Returns the remainder of the division of the left operand by the right operand.

a = 10
b = 3
result = a % b # result will be 1

Exponentiation ():** Raises the left operand to the power of the right operand.

a = 2
b = 3
result = a ** b # result will be 8

These arithmetic operators are fundamental in programming and are used extensively for performing mathematical calculations in various applications. It’s essential to understand their behavior and precedence rules when writing programs to ensure correct and efficient computation.

 

Press the “Mark as Complete” button to finish the lecture.

You cannot copy content of this page