Understanding the common arithmetic operators

Cards (42)

  • What is an arithmetic operator used for in programming?
    Mathematical calculations
  • The multiplication operator in programming is represented by the symbol *.

    True
  • The integer division operator in programming is represented by the symbol //
  • The exponentiation operator is represented by the symbol ** or ^.

    True
  • Integer division returns the remainder of a division operation.
    False
  • Match each arithmetic operator with its purpose:
    Addition ↔️ Adds two numbers together
    Subtraction ↔️ Finds the difference between two numbers
    Multiplication ↔️ Multiplies two numbers
    Integer Division ↔️ Divides and returns the whole number result
  • The Multiplication operator is represented by the symbol \*
  • What does the Modulo (%) operator return?
    The remainder
  • The Addition operator combines two numbers
    True
  • The Subtraction operator is represented by the symbol -
  • What is the purpose of the Exponentiation operator (**)?
    Raises a number to a power
  • The Integer Division operator returns only the whole number part
  • PEMDAS is a mnemonic for the order of operations in mathematical expressions

    True
  • What are the steps in the PEMDAS/BODMAS order of operations?
    1️⃣ Parentheses/Brackets
    2️⃣ Exponents/Orders
    3️⃣ Multiplication and Division (from left to right)
    4️⃣ Addition and Subtraction (from left to right)
  • Order the steps of PEMDAS/BODMAS
    1️⃣ Parentheses/Brackets
    2️⃣ Exponents/Orders
    3️⃣ Multiplication and Division
    4️⃣ Addition and Subtraction
  • Following the correct order of operations ensures consistency in results
  • Arithmetic operators are used in programming to perform mathematical calculations.

    True
  • What is the result of 15 / 3 using the division operator (/)?
    5.0
  • What is the result of 15 // 3 using the integer division operator (//)?
    5
  • Parentheses are always evaluated first in PEMDAS
    True
  • What is the result of 5 ** 2 according to PEMDAS?
    25
  • Arithmetic operators are essential symbols in programming that perform mathematical calculations
  • Match the arithmetic operator with its purpose:
    Addition (+) ↔️ Adds two numbers together
    Subtraction (-) ↔️ Finds the difference between two numbers
    Multiplication (*) ↔️ Multiplies two numbers
    Division (/) ↔️ Divides one number by another, returns a decimal result
  • What does the Integer Division (//) operator return?
    The whole number part
  • Match the arithmetic operator with its example:
    Addition (+) ↔️ 5 + 3
    Subtraction (-) ↔️ 10 - 4
    Multiplication (*) ↔️ 7 \* 2
  • What is the purpose of the addition operator (+)?
    Adds two numbers together
  • It is essential to follow the order of operations known as PEMDAS
  • In the expression (2 + 3) * 4, which operation is performed first?
    Addition
  • The multiplication and division operations are always performed from left to right in PEMDAS/BODMAS.

    True
  • The addition operator in programming is represented by the symbol +
  • What result does the division operator return when dividing 15 by 3?
    5.0
  • What does the modulo operator calculate?
    Remainder
  • The integer division operator returns only the whole
  • What does the exponentiation operator do to a number?
    Raises to a power
  • The Integer Division operator is represented by the symbol //
  • The Addition operator is represented by the symbol +
  • What does the subtraction operator (-) do?
    Finds the difference between two numbers
  • What type of result does the division operator (/) return?
    Decimal
  • The integer division operator (//) returns only the whole number part of the result
  • The modulo operator (%) returns the remainder when one number is divided by another.
    True