
Java Semester Test

Quiz
•
Computers
•
11th Grade
•
Medium
Douglas Ray
Used 3+ times
FREE Resource
35 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is not a valid condition to go in an if statement for Karel?
ballsPresent()
frontIsClear()
leftIsBlocked()
turnLeft()
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Say Karel is on a location with one tennis ball. After the following code runs, how many tennis balls will there be at that location?
0
1
2
6
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What condition should be used in this while loop to get Karel to pick up all the tennis balls on the current location?
noBallsPresent()
ballsPresent()
frontIsClear()
takeBall()
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Why does a programmer indent their code?
Helps show the structure of the code.
Easier for other people to understand.
A key part of good programming style!
All of the above
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Say you want to write a program to have Karel put down 300 tennis balls. Which control structure would you use?
If Statement
While Loop
For Loop
Nested While Loop
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following program: (Assume the user enters ‘Florence’ then ‘Fernandez’.)
Fernandez Florence
Fernandez
Florence
FlorenceFernandez
Florence Fernandez
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following choices is a properly formed JavaScript variable name, meaning it is both legal in the JavaScript language and considered good style?
user_age
UserAge
userAge
User age
Create a free account and access millions of resources
Similar Resources on Wayground
30 questions
Apple Swift Coding I - Lesson 1 - 6

Quiz
•
9th - 12th Grade
30 questions
Python L2 Programming Challenge

Quiz
•
3rd - 12th Grade
40 questions
FBLA Exploring Computer Science

Quiz
•
6th - 12th Grade
31 questions
CMU CS (2) Functions, Mouse Events, Variables, Shape Properties

Quiz
•
9th - 12th Grade
32 questions
Javascript Quiz by Brandon and Amali

Quiz
•
11th Grade
30 questions
AP CSP Programming Basics

Quiz
•
10th - 12th Grade
40 questions
C Programming Midterm Review

Quiz
•
11th - 12th Grade
30 questions
CFU 2.1 - Karel Python CodeHS (mod 1-5)

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
20 questions
PBIS-HGMS

Quiz
•
6th - 8th Grade
10 questions
"LAST STOP ON MARKET STREET" Vocabulary Quiz

Quiz
•
3rd Grade
19 questions
Fractions to Decimals and Decimals to Fractions

Quiz
•
6th Grade
16 questions
Logic and Venn Diagrams

Quiz
•
12th Grade
15 questions
Compare and Order Decimals

Quiz
•
4th - 5th Grade
20 questions
Simplifying Fractions

Quiz
•
6th Grade
20 questions
Multiplication facts 1-12

Quiz
•
2nd - 3rd Grade