Practice Example 2: Check Even or Odd - 4.6.2 | 4. Program Coding | ICSE Class 8 Computer Applications
K12 Students

Academics

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

Professionals

Professional Courses

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

Games

Interactive Games

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

Practice Questions

Test your understanding with targeted questions related to the topic.

Question 1

Easy

What does num % 2 return if num is an even number?

💡 Hint: Think about division and remainders.

Question 2

Easy

In the Python program we wrote, what function is used to get user input?

💡 Hint: It starts with an 'i' and is short for something.

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 the modulo operator do?

  • A: It adds two numbers
  • B: It divides two numbers
  • C: It returns the remainder of a division

💡 Hint: Think about how division and remainders work.

Question 2

If you input 10 into the program, will the output be 'Even'?

  • True
  • False

💡 Hint: Is 10 divisible by 2 without a remainder?

Solve and get performance evaluation

Challenge Problems

Push your limits with challenges.

Question 1

Write a program that repeatedly asks the user for numbers and stops when the user enters '0'. It should indicate if each number is even or odd.

💡 Hint: Think about how to implement a stopping condition.

Question 2

Modify the program to count how many even and how many odd numbers have been inputted by the user.

💡 Hint: Consider how to maintain and update counters for even and odd inputs.

Challenge and get performance evaluation