Unit 3 Review

Unit 3 Review

9th - 12th Grade

18 Qs

quiz-placeholder

Similar activities

Text and Image representation

Text and Image representation

11th Grade

22 Qs

9G4 CS Python Programming Sequence and Vocabs

9G4 CS Python Programming Sequence and Vocabs

9th Grade

13 Qs

quizz tkinter

quizz tkinter

11th Grade - University

20 Qs

ความรู้เบื้องต้นการเขียนโปรแกรมภาษาซี

ความรู้เบื้องต้นการเขียนโปรแกรมภาษาซี

12th Grade

20 Qs

ICT WEBINAR QUIZ

ICT WEBINAR QUIZ

KG - Professional Development

20 Qs

Computer Fundamentals

Computer Fundamentals

10th Grade

20 Qs

ICT S120 (Prelim Review)

ICT S120 (Prelim Review)

11th Grade

15 Qs

Input, output and storage de

Input, output and storage de

8th Grade - Professional Development

14 Qs

Unit 3 Review

Unit 3 Review

Assessment

Quiz

Computers

9th - 12th Grade

Medium

Created by

Karen Russo

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

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

18 questions

Show all answers

1.

FILL IN THE BLANK QUESTION

1 min • 1 pt

If a = 15 and b = 12, what is the result of the following:

if (a ==10)

{ b = b + a;

a = 5; }

else if (a > 10)

{ a = a - b;

b = a * b; }

a = _______________ b = ____________

2.

FILL IN THE BLANK QUESTION

1 min • 1 pt

What will be the output for the following program segment?

int junk = 12;

if (junk > 5)

if (junk % 5 == 0)

System.out.println ("The value of junk is: " + junk);

else

System.out.println(("Junk is negative");

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Find the errors in the following if statement.

if x > 0 then System.out.println(x);

needs an == sign

No parentheses around x > 0

"then" is not used in java

No parentheses around x > 0 and "then" is not used in java

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Find the error in the following if statement.

if ( x = 1) { y ++;}

y ++ is not a valid statement

the curly brackets will cause a compile error

the condition should be (x == 1)

there is no else statement

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Find the error in the following if statement.

String word = new String("Hello");

String word2 = new String("Hello");

if (word == word2)

System.out.println("The words are the same");

else

System.out.println("The words are not the same");

it is missing curly brackets

you need to use .equals() instead of ==

you need to use = instead of ==

There is no error

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Find the error in the following if statements.

String word = new String ("Hello");

String word2 = new String("Hello");

if (word.equals(word2));

System.out.println("The words are the same");

else

System.out.println("The words are not the same");

use == instead of .equals()

there are no curly brackets

remove the ; at the end of the if condition

use = instead of .equals()

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the value of s if x = 5 and y = 2 after executing the following cod:

s = 0;

if (x > 0) { s++;}

if (y > 0) {s ++;}

s = 0

s = 1

s = 2

s = -2

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?