Practice Conditional Statements - 8.2.2.1 | 8. Statements and Scope | ICSE 11 Computer Applications
Students

Academic Programs

AI-powered learning for grades 8-12, aligned with major curricula

Professional

Professional Courses

Industry-relevant training in Business, Technology, and Design

Games

Interactive Games

Fun games to boost memory, math, typing, and English skills

Conditional Statements

8.2.2.1 - Conditional Statements

Enroll to start learning

You’ve not yet enrolled in this course. Please enroll for free to listen to audio lessons, classroom podcasts and take practice test.

Learning

Practice Questions

Test your understanding with targeted questions

Question 1 Easy

What will be the output if int age = 16; if (age >= 18) { System.out.println("Adult"); } else { System.out.println("Minor"); }?

💡 Hint: Think about the value of age and its comparison.

Question 2 Easy

What is the basic syntax of an if statement?

💡 Hint: Remember the structure of an if statement.

4 more questions available

Interactive Quizzes

Quick quizzes to reinforce your learning

Question 1

Which of the following statements is correct about the if statement?

It can only have one branch
It can have multiple branches
It cannot execute code

💡 Hint: Consider how multiple conditions can be checked.

Question 2

True or False: The switch statement requires at least one case to be defined.

True
False

💡 Hint: Think about what happens if no cases are provided.

2 more questions available

Challenge Problems

Push your limits with advanced challenges

Challenge 1 Hard

Write a program that determines a grade based on a score using if-else statements. The grading scale is: A (90-100), B (80-89), C (70-79), D (60-69), F (below 60).

💡 Hint: Remember to check ranges correctly for each grade.

Challenge 2 Hard

Create a program that uses a switch statement to display the number of days in a month. Ensure to handle February correctly for leap years.

💡 Hint: Think about how leap years affect February's day count.

Get performance evaluation

Reference links

Supplementary resources to enhance your learning experience.