Practice Example 2: Check Even or Odd - 4.6.2 | 4. Program Coding | ICSE 8 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

Example 2: Check Even or Odd

4.6.2 - Example 2: Check Even or Odd

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 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.

4 more questions available

Interactive Quizzes

Quick quizzes to reinforce your learning

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?

Get performance evaluation

Challenge Problems

Push your limits with advanced challenges

Challenge 1 Hard

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.

Challenge 2 Hard

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.

Get performance evaluation

Reference links

Supplementary resources to enhance your learning experience.