🎯

Logic Building - Phase 1: Conditional Thinking

Test your understanding of if-else statements, boolean logic, and conditional decision-making

50 questions•5 pages•~75 min
Progress: 0 / 500%
Page 1 of 5 • Questions 1-10 of 50
Q1easy

What will be the output? num = 5 if num > 0: print("Positive") else: print("Negative")

Q2easy

What is the result of: 7 % 2 == 0?

Q3medium

What will be printed? x = 10 y = 5 if x > y and x % 2 == 0: print("Condition met") else: print("Condition not met")

Q4medium

Which condition checks if a number is divisible by both 3 and 5?

Q5hard

What is the correct condition to check if a year is a leap year?

Q6easy

What will be the output? ch = "A" if ch.isupper(): print("Uppercase") elif ch.islower(): print("Lowercase") else: print("Other")

Q7medium

Which operator has the highest precedence: and, or, or not?

Q8easy

What will be printed? marks = 85 if marks >= 90: grade = "A" elif marks >= 80: grade = "B" elif marks >= 70: grade = "C" else: grade = "F" print(grade)

Q9easy

What is the result of: not (True and False)?

Q10medium

For a triangle with sides a, b, c, which condition checks if it forms a valid triangle?

...