Programming Flashcard

Programming Flashcard

Assessment

Flashcard

Computers

11th Grade

Practice Problem

Hard

Created by

Wayground Content

FREE Resource

Student preview

quiz-placeholder

18 questions

Show all answers

1.

FLASHCARD QUESTION

Front

What value would be returned for findTheMiddle(2110890125)? Options: 8, The code will error, 9, 89

Media Image

Back

89

2.

FLASHCARD QUESTION

Front

Which expression is true? Options: true && !true, !false || !true, true && false, false || false || !true

Back

!false || !true

3.

FLASHCARD QUESTION

Front

What will this code output? Options: Hello Karel, Hello Karel Second if statement!, Second if statement!, This program will print nothing

Media Image

Back

Second if statement!

4.

FLASHCARD QUESTION

Front

What will this program print if the value of grade is 80? A, B, C, Nothing

Back

C

5.

FLASHCARD QUESTION

Front

What are the final values of x and y after the code is executed?
int x = 100;
int y = 100;
if (x <= 100)
{ if (y > 100)
{
x = 200;
}
else
{
x = 99;
}
}
else{
x++;
}
y = x + y;

Back

x = 99, y = 199

6.

FLASHCARD QUESTION

Front

Which of the following test cases can be used to show that the code does NOT work as intended? Options: calculateRate(35);, calculateRate(40);, calculateRate(45);, calculateRate(55);

Media Image

Back

calculateRate(40);

7.

FLASHCARD QUESTION

Front

Given a, b, and c are properly initialized boolean values, what values would make the following expression false? (a || b) || (b || c) || (!a || b);

Back

Nothing. The expression will always be true.

Access all questions and much more by creating a free account

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?