Practice Conditional Statements - 1.3 | Chapter 8: Statements and Scope | ICSE Class 12 Computer Science
K12 Students

Academics

AI-Powered learning for Grades 8–12, aligned with major Indian and international curricula.

Academics
Professionals

Professional Courses

Industry-relevant training in Business, Technology, and Design to help professionals and graduates upskill for real-world careers.

Professional Courses
Games

Interactive Games

Fun, engaging games to boost memory, math fluency, typing speed, and English skillsβ€”perfect for learners of all ages.

games

Practice Questions

Test your understanding with targeted questions related to the topic.

Question 1

Easy

Write an if statement that prints 'Hello' if a variable x is greater than 10.

πŸ’‘ Hint: Think about the condition you're checking.

Question 2

Easy

Create an if-else statement that checks if a number is even or odd.

πŸ’‘ Hint: Use the modulus operator %.

Practice 4 more questions and get performance evaluation

Interactive Quizzes

Engage in quick quizzes to reinforce what you've learned and check your comprehension.

Question 1

What does an if statement do?

  • Executes code based on true condition
  • Always executes
  • Never executes

πŸ’‘ Hint: Remember the conditional nature of if statements.

Question 2

True or False: An if-else statement is used when you want to handle one condition only.

  • True
  • False

πŸ’‘ Hint: Consider what happens when the condition is false.

Solve 2 more questions and get performance evaluation

Challenge Problems

Push your limits with challenges.

Question 1

Write a program that takes an input of grades and provides feedback such as 'Excellent', 'Good', or 'Needs Improvement' based on the grade ranges.

πŸ’‘ Hint: Use elif to handle multiple outcomes based on the input grade.

Question 2

Create a program that checks the weather condition from user input and responds differently based on conditions like 'rain', 'sunny', or 'cloudy'.

πŸ’‘ Hint: Use if-elif to give multiple responses based on specific inputs.

Challenge and get performance evaluation