Modulus % (Computer Science)

Modulus % (Computer Science)

9th - 12th Grade

15 Qs

quiz-placeholder

Similar activities

Nhập môn HTML

Nhập môn HTML

6th - 9th Grade

13 Qs

11° Evaluación bimestral de informática

11° Evaluación bimestral de informática

11th Grade

15 Qs

TIN 11 BÀI 11 KIỂU MẢNG

TIN 11 BÀI 11 KIỂU MẢNG

11th Grade

18 Qs

Начала программирования на языке Паскаль

Начала программирования на языке Паскаль

8th - 11th Grade

15 Qs

RAM&HDD/SSD

RAM&HDD/SSD

10th - 12th Grade

13 Qs

Pengayaan Informatika

Pengayaan Informatika

12th Grade

20 Qs

EXCEL

EXCEL

10th Grade

20 Qs

KT 15 PHUT

KT 15 PHUT

10th Grade

10 Qs

Modulus % (Computer Science)

Modulus % (Computer Science)

Assessment

Quiz

Computers

9th - 12th Grade

Practice Problem

Easy

Created by

Edward Barcenas

Used 9+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which if statement correctly checks if a number is even?

if ( number % 2 != 0 )

if ( number % 2 == 0 )

if ( number % 2 == 1 )

if ( number % 2 == 2 )

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which if statement checks if a number is divisible by 5?

if ( number % 5 != 0 )

if ( number % 5 == 1 )

if ( number % 5 == 0 )

if ( number % 5 == 5 )

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which if statement checks if a number is not divisible by 7?

if ( number % 7 == 7 )

if ( number % 7 != 0 )

if ( number % 7 == 0 )

if ( number % 7 != 7 )

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which if statement correctly checks if a number is divisible by both 3 and 4?

if ( number % 3 == 0 && number % 4 == 0 )

if ( number % 3 == 0 || number % 4 == 0 )

if ( number % 3 != 0 && number % 4 != 0 )

if ( number % 3 != 0 || number % 4 != 0 )

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which if statement checks if the first number is divisible by the second number?

if ( firstNumber % secondNumber == 1 )

if ( firstNumber % secondNumber == 0 )

if ( firstNumber == secondNumber % 0 )

if ( firstNumber % secondNumber != 0 )

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which if statement checks if a number is not divisible by 2 and not divisible by 3?

if ( number % 2 == 0 && number % 3 == 0 )

if ( number % 2 != 0 && number % 3 != 0 )

if ( number % 2 != 0 && number % 3 == 0 )

if ( number % 2 == 0 && number % 3 != 0 )

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which if statement checks if a number is divisible by 6 but not by 9?

if ( number % 6 == 0 && number % 9 == 0 )

if ( number % 6 == 0 && number % 9 != 0 )

if ( number % 6 != 0 && number % 9 != 0 )

if ( number % 6 != 0 && number % 9 == 0 )

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?