PLS HELP ME I NEED TO GET A GOOD GRADE ON THIS ( I will post the remainder of the questions once these get answered)
1. Karel is at (1, 1). If the following code is run, where will Karel be when the program is completed?
function start(){
move();
move();
turnLeft();
turnLeft();
move();
move();
} A. (1, 1) B. (3, 3) C. (1, 3) D. (3,1)
2. Karel is facing east. If the following code is run, which way will Karel be facing when the program is completed?
function start(){
turnLeft();
turnLeft();
turnLeft();
}
A. East
B. North
C. West
D. South
3. Which of the following code snippets will select all tags on a page and give them a height of 200 pixels?
A. img = style=”height:200px”
B. tag=”img” {
height: 200px;
}
C. img {
height: 200px;
}
{
D. height: 200px;
}
4. Why will the following code not run properly?
function start(){
makeCake();
}
function makeCake()
move();
putBall(),
move();
putBall();
turnleft();
move();
putBall();
}
A. Capital Case is not used properly
B. Punctuation is incorrect
C.The function makeCake is not defined correctly.
D. All of the above
5. Which of the following items is an example of a user application?
I. Browser
II. Text editor
III. Games
IV. File Explorer
A. II, III
B. I, II
C. I, II, IV
D. I, II, III, IV
6. Why do we use functions in programming?
A. Break down our program into smaller parts
B. Avoid repeating code
C. Make our program more readable
D. All of the above
7.In the following code, how many times is the function turnAround() called and how many times is it defined?
function start(){
turnAround();
move();
turnAround();
move();
turnAround();
}
function turnAround(){
turnLeft();
turnLeft();
}
A. Called 4
B. Called 1, Defined 3
C. Defined 4
D. Called 3, Defined 1
8. Which of the following is considered an unethical use of computer resources?
A. Downloading file sharing software on your home computer
B. Searching online for the answers to CodeHS exercises and quizzes
C. Purchasing an app from an app store and downloading it directly to a mobile device
D. Searching online for an electronic version of a textbook
9. Which of these is a valid Karel command to move forward?
A. move;
B. move()
C. MOVE
D. move();
10. In a computer code, how many times can a function be defined?
A. 0
B. 1
C. 2
D. As many times as one wants