Bird
0
0

Which of the following is the correct Kotlin syntax to check if variable num is greater than or equal to 100?

easy📝 Syntax Q3 of 15
Kotlin - Operators and Expressions
Which of the following is the correct Kotlin syntax to check if variable num is greater than or equal to 100?
Anum => 100
Bnum >= 100
Cnum =>= 100
Dnum =< 100
Step-by-Step Solution
Solution:
  1. Step 1: Identify the correct operator for greater than or equal

    The correct operator is >= in Kotlin.
  2. Step 2: Check syntax correctness

    num >= 100 uses num >= 100, which is valid syntax. Other options have invalid operator symbols.
  3. Final Answer:

    num >= 100 -> Option B
  4. Quick Check:

    Greater than or equal operator = >= [OK]
Quick Trick: Use >= for greater than or equal [OK]
Common Mistakes:
MISTAKES
  • Writing => instead of >=
  • Using =< instead of <=

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kotlin Quizzes