WorksheetsIST - Final Review
Total questions: 58
Worksheet time: 31mins
Which of the following is an example of an Input Device?
Mouse
Keyboard
Touch Screen
All of the Above
Which of the following is the role of HTML in Web Development?
To provide the structure of a web page
To style a web page
To address and send information over the internet
HTML is not related to Web Development
Which of the following would be controlled by CSS in Web Development?
Organizing text into lists
Separating headings from paragraphs
Making the text a different color
Creating hyperlinks that connect one web page to another
A web developer wants to make the title of the web page larger than the other text. Which of the following solutions would work?
Use <h6> for the title and <h3> for the other text
Use <h1> for the title and <p> for the other text
Put the code style=”larger” inside the h3 tag
All of the above
Which element is used to create a hyperlink that connects web pages to other pages on the internet?
<src>
<head>
<link>
<a>
Why is it useful to use functions when programming?
They are a good way to store user input to use later in the program
They make the program run faster
They let you use the same code in different places without having to rewrite it
They are necessary for any program to run
What type of expression is created by using an IF/THEN statement?
Variable
Conditional
Function
Sprite
HTML uses _____ to organize information.
Tabs
Tags
Labels
Quotes
src attribute and then displays it.What does CPU stand for?
Computational Unit
Computer Processing Unit
Central Processing Unit
Command Processing Unit
What is the device shown in the picture?
INPUT
OUTPUT
MOUSE
KEYBOARD
The physical objects that make up the computer system:
Software
Storage
Input
Hardware
Any part of your computer that has a physical structure, such as the keyboard or mouse
software
hard drive
hardware
digiware
Microphone
Hardware
Software
Peopleware
Mouse
Input Device
Processing Device
Output Device
Storage Device
Any device or component that receives information from a computer
output
input
algorithm
processing
Why do we use functions in programming?
Break down our program into smaller parts
Avoid repeating code
Make our program more readable
All of the above
What is top down design?
Top down design is a way of designing your program by starting with the biggest problem and breaking it down into smaller and smaller pieces that are easier to solve.
Top down design is a way that you can create designs on a computer to put on a web page
Top down design is a way of designing your programs starting with the individual commands first
Top down design is a way to use loops and classes to decompose the problem
What is a code comment?
A way to teach Karel a new word
A way to give notes to the reader to explain what your code is doing
A message to your teacher in code
A place to write whatever you want in your code
What commands does SuperKarel know that regular Karel does not?
turnLeft() and jump()
turnRight() and jump()
turnAround() and turnRight()
turnAround() and jump()
What is the best way for Karel to move 10 times?
move();
move();
move();
move();
move();
move();
move();
move();
move();
move();
for (var i = 0; i < 10; i++) {
move();
}
move(10);
move10();
How many times should the start function be defined in a program?
0
1
2
As often as you like
Which of the following commands is a valid Karel command?
move
move;
move();
move()
What makes the following command an invalid Karel command?
turnleft();
It should end in a colon rather than a semicolon
The l should be a capital L
It should start with a capital T
This command is correct
Which of the following is the correct way to define a turnRight function in Karel?
If Karel starts at Street 1 and Avenue 1, facing East, where will Karel be, and what direction will Karel be facing after running the following code? (Assume the world is 10x10 in size)
Street 3, Avenue 1, Facing North
Street 1, Avenue 4, Facing North
Street 1, Avenue 3, Facing South
Street 1, Avenue 3, Facing North
Karel starts at Street 1 and Avenue 1, facing East. After calling the stairStep function twice, where will Karel be and what direction will Karel be facing? (assume this is a SuperKarel program and the world is 10x10 in size)
Street 2, Avenue 2, Facing North
Street 3, Avenue 3, Facing East
Street 3, Avenue 3, Facing West
Street 4, Avenue 4, Facing East
In this code, how many times is the dance function called and how many times is it defined?
Called 1 time, defined 1 time
Called 1 time, defined 3 times
Called 3 times, defined 1 time
Called 3 times, defined 3 times
What's wrong with this code?
The go function is called twice
The go function has a syntax error
The go function has been defined twice
go is not a command that Karel understands
How many total times will Karel move in this program?
1
5
6
7
What is wrong with this for loop?
A. The for loop uses commas instead of semicolons
B. It should say i++ instead of i + 1
A
B
A and B
The for loop is correct
What is the proper format for a single line comment in Karel?
This is a comment
//This is a comment
/*This is a comment
This is a comment();
What does the mystery function do?
Karel moves until it is on a ball
Karel moves once if there is no ball present
Karel moves until it puts down a ball
Karel check if there is no ball on the current spot and then moves once
Which of the following is not a valid condition to go in an if statement for Karel?
ballsPresent()
frontIsClear()
leftisBlocked()
turnLeft()
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
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()
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
Al the above
How can we teach Karel new commands
For loop
While loop
Define a new function
The start function
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
Karel starts at Street 1, Avenue 1, facing East in a 5x5 world. What will happen after this code runs?
Karel ends on street 1, avenue 3
Karel ends on street 2, avenue 3
This code won't run because of a syntax error
Karel will crash into a wall
Karel starts at Street 1, Avenue 1, facing East in a 5x5 world. What will happen after this code runs?
Karel will end on Street 1, Avenue 2
Karel will end on Street 1, Avenue 7
This code won't run because of a syntax error
Karel will crash into a wall
How can we improve the following program?
Break down this program into more functions
Use a for loop to repeat the move command
Use a while loop to repeat the move command
Fix the indentation of this program
In the following code below from the Cleanup Karel example, what is the purpose of If Statement #2?
To move the last time
To pick up the ball that is in the last spot
To pick up the ball that is in the last spot, if there is one
To take the ball from all of the positions that have a ball on them
In the following code, what would be a good Postcondition to write?
Karel is on a spot with a tennis ball facing North
Karel end one spot above a tennis ball facing East
Karel is on the same position but on top of a ball
Karel is facing East
What is the purpose of using a for loop in code?
Todo something if a condition is true
To do something while a condition is true
To repeat something a fixed number of time
To make programs run faster
What is another reason we use functions?
To help make things in programming more complex.
to repeat code more frequently and make it harder to others to know what we are doing.
To avoid repeating code and make it more readable.
To help fight against galactic invaders and keep cats out of Karel's world.
In the following code snippet, how many times is the turnRight function called and how many times is it defined?
Called 1 time, defined 1 time
Called 1 time, defined 3 times
Called 3 times, defined 1 time
Called 3 times, defined 3 times
Which function will allow Karel to spin in circle?
move( );
turnLeft( );
putBall( );
jump( );
What is a characteristic of Karel's world?
In Karel's world, what can't Karel cannot move through
Makes Karel move forward one step in the direction he is facing
Will this code put two balls in the same place and then move one place?
putBall();
move();
putBall();
True
False
_________________ is giving the computer a set of commands.
Debugging
Programming
the Internet
Karel
