0
0
Kotlinprogramming~5 mins

Arithmetic operators in Kotlin - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What are arithmetic operators in Kotlin?
Arithmetic operators are symbols that perform basic math operations like addition, subtraction, multiplication, division, and modulus on numbers.
Click to reveal answer
beginner
What does the '+' operator do in Kotlin?
The '+' operator adds two numbers together. For example, 3 + 2 equals 5.
Click to reveal answer
beginner
What is the result of 10 % 3 in Kotlin?
The '%' operator gives the remainder of division. 10 % 3 equals 1 because 3 goes into 10 three times with 1 left over.
Click to reveal answer
intermediate
How does Kotlin handle division with '/' operator for integers?
When dividing two integers, Kotlin performs integer division, which means it returns the whole number part only, discarding any remainder.
Click to reveal answer
beginner
What is the difference between '/' and '%' operators in Kotlin?
'/' divides two numbers and returns the quotient, while '%' returns the remainder after division.
Click to reveal answer
What is the result of 7 + 5 in Kotlin?
A2
B12
C75
DError
What does the '%' operator do?
AReturns the remainder of division
BDivides two numbers
CMultiplies two numbers
DSubtracts two numbers
What is the output of 10 / 4 in Kotlin when both are integers?
A2
B2.5
C3
D4
Which operator multiplies two numbers?
A+
B-
C/
D*
What is the result of 15 % 6?
A2
B0
C3
D9
Explain the five basic arithmetic operators in Kotlin and give an example of each.
Think about +, -, *, /, and % symbols.
You got /6 concepts.
    Describe how Kotlin handles division when both numbers are integers.
    What happens to the decimal part?
    You got /3 concepts.