Code HS
Latest uploads at Code HS. Looking for notes at Code HS? We have lots of notes, study guides and revision notes available for your school.
-
207
- 0
-
14
All courses for Code HS
-
Code HS 1
-
Code HS 207
-
Code-HS 3
Latest content Code HS
Why are parameters useful? They allow us to tailor functions to be used in multiple 
situations 
 
How many parameters can we use in each function? As many as we need 
 
What is the default starting value of i in a for loop? 0 
 
What will the values of i be at each iteration of the loop below? 
 
For i in range(3): 0, 1, 2 
 
What will happen when the value of i reaches 5 in the loop below? 
 
for i in range(5): 
left(i)
- Exam (elaborations)
- • 2 pages's •
-
Code HS•Code HS
Preview 1 out of 2 pages
Getting your document ready...
Why are parameters useful? They allow us to tailor functions to be used in multiple 
situations 
 
How many parameters can we use in each function? As many as we need 
 
What is the default starting value of i in a for loop? 0 
 
What will the values of i be at each iteration of the loop below? 
 
For i in range(3): 0, 1, 2 
 
What will happen when the value of i reaches 5 in the loop below? 
 
for i in range(5): 
left(i)
Comments are written for... Humans to read and to understand 
 
What symbol is used at the beginning of an in-line comment? # 
 
What punctuation is used to begin a multi-line comment? """ 
 
What name follows all naming rules? make_square 
 
If I am creating a function that makes two squares, what would be the best name option? 
draw_squares 
 
What is not a way functions make our code more readable? Each function only contains one 
command 
 
What two things must be included in your functio...
- Exam (elaborations)
- • 3 pages's •
-
Code HS•Code HS
Preview 1 out of 3 pages
Getting your document ready...
Comments are written for... Humans to read and to understand 
 
What symbol is used at the beginning of an in-line comment? # 
 
What punctuation is used to begin a multi-line comment? """ 
 
What name follows all naming rules? make_square 
 
If I am creating a function that makes two squares, what would be the best name option? 
draw_squares 
 
What is not a way functions make our code more readable? Each function only contains one 
command 
 
What two things must be included in your functio...
Suppose you have a function that computes the area of a diamond. Which of the following 
comments would be the best yo use? 
 
//This is a function 
// This function computes the area 
// Computes and returns the area of a diamond using the parameters height and width 
The function doesn't need a comment // Computes and returns the area of a diamond using 
the parameters height and width 
 
The following if statement should check that an object will fit on the screen. The variables height 
and ...
- Exam (elaborations)
- • 6 pages's •
-
Code HS•Code HS
Preview 2 out of 6 pages
Getting your document ready...
Suppose you have a function that computes the area of a diamond. Which of the following 
comments would be the best yo use? 
 
//This is a function 
// This function computes the area 
// Computes and returns the area of a diamond using the parameters height and width 
The function doesn't need a comment // Computes and returns the area of a diamond using 
the parameters height and width 
 
The following if statement should check that an object will fit on the screen. The variables height 
and ...
Which of these is a valid Karel command? 
 
move; 
 
MOVE 
 
move(); 
 
move() move(); 
 
What is a street in a Karel world? 
 
A row 
 
A column
- Exam (elaborations)
- • 35 pages's •
-
Code HS•Code HS
Preview 4 out of 35 pages
Getting your document ready...
Which of these is a valid Karel command? 
 
move; 
 
MOVE 
 
move(); 
 
move() move(); 
 
What is a street in a Karel world? 
 
A row 
 
A column
4.1.4: Fix This Program brought_food = True 
brought_drink = False 
print(brought_food) 
print(brought_drink) 
# These lines don't work! Fix them so that they do. 
print(type ("Did the person bring food? " + str(brought_food))) 
print(type ("Did the person bring a drink? " + str(brought_drink))) 
 
4.1.5: Plants needs_water = True 
needs_to_be_repotted = False 
print("Needs water: " + str(needs_water)) 
print (str(needs_to_be_repotted)) 
print(needs_water) 
 
4.2.5: Fix This Program can_j...
- Exam (elaborations)
- • 6 pages's •
-
Code HS•Code HS
Preview 2 out of 6 pages
Getting your document ready...
4.1.4: Fix This Program brought_food = True 
brought_drink = False 
print(brought_food) 
print(brought_drink) 
# These lines don't work! Fix them so that they do. 
print(type ("Did the person bring food? " + str(brought_food))) 
print(type ("Did the person bring a drink? " + str(brought_drink))) 
 
4.1.5: Plants needs_water = True 
needs_to_be_repotted = False 
print("Needs water: " + str(needs_water)) 
print (str(needs_to_be_repotted)) 
print(needs_water) 
 
4.2.5: Fix This Program can_j...
Why does a programmer indent their code? Easier for other people to understand, it helps 
show the structure of the code, and it's a key part of good programming style! 
 
Which of these is a valid way to write a single line comment in Java? 
 
/ / This is a comment 
 
+ + This is a comment 
 
This is a comment / / 
 
/ * This is a comment / / This is a comment 
 
What is a method in Karel? A method is a command that Karel can do. It has a name and a 
set of instructions
- Exam (elaborations)
- • 20 pages's •
-
Code HS•Code HS
Preview 3 out of 20 pages
Getting your document ready...
Why does a programmer indent their code? Easier for other people to understand, it helps 
show the structure of the code, and it's a key part of good programming style! 
 
Which of these is a valid way to write a single line comment in Java? 
 
/ / This is a comment 
 
+ + This is a comment 
 
This is a comment / / 
 
/ * This is a comment / / This is a comment 
 
What is a method in Karel? A method is a command that Karel can do. It has a name and a 
set of instructions
2.1.4 stretched slinky circle(35) 
forward(40) 
circle(35) 
forward(40) 
circle(35) 
forward(40) 
circle(35) 
forward(40) 
circle(35) 
forward(40) 
 
2.2.4 shorter dashed line penup() 
backward(200) 
pendown() 
forward(50) 
penup()
- Exam (elaborations)
- • 39 pages's •
-
Code HS•Code HS
Preview 4 out of 39 pages
Getting your document ready...
2.1.4 stretched slinky circle(35) 
forward(40) 
circle(35) 
forward(40) 
circle(35) 
forward(40) 
circle(35) 
forward(40) 
circle(35) 
forward(40) 
 
2.2.4 shorter dashed line penup() 
backward(200) 
pendown() 
forward(50) 
penup()
A child with Down’s syndrome has had frequent respiratory tract infections since birth. What 
should the APRN tell the parent is the underlying cause of this illness? 
Gastroesophageal reflux disease causes aspiration of thin fluids. 
Feedback: Gastroesophageal reflux is commonly seen in children with Down syndrome and can 
be severe enough to result in aspiration of stomach contents, causing respiratory symptoms such 
as persistent coughing, wheezing, and pneumonia 
The FNP understands that a...
- Exam (elaborations)
- • 16 pages's •
-
Code HS•Code HS
Preview 3 out of 16 pages
Getting your document ready...
A child with Down’s syndrome has had frequent respiratory tract infections since birth. What 
should the APRN tell the parent is the underlying cause of this illness? 
Gastroesophageal reflux disease causes aspiration of thin fluids. 
Feedback: Gastroesophageal reflux is commonly seen in children with Down syndrome and can 
be severe enough to result in aspiration of stomach contents, causing respiratory symptoms such 
as persistent coughing, wheezing, and pneumonia 
The FNP understands that a...
Cyber-security the state of being protected against the criminal or unauthorized use of 
electronic data, or the measures taken to achieve this. 
 
Why is it important to learn about Cyber-security? So we learn how to protect our 
information/data from being leaks. 
 
What is not true about Cyber-Security? Cyber attacks can devastate large organizations, but 
individuals are largely unaffected. 
 
Cyber Meaning dealing with computers or computer network. 
 
Security Measure taken to guard agains...
- Exam (elaborations)
- • 10 pages's •
-
Code HS•Code HS
Preview 2 out of 10 pages
Getting your document ready...
Cyber-security the state of being protected against the criminal or unauthorized use of 
electronic data, or the measures taken to achieve this. 
 
Why is it important to learn about Cyber-security? So we learn how to protect our 
information/data from being leaks. 
 
What is not true about Cyber-Security? Cyber attacks can devastate large organizations, but 
individuals are largely unaffected. 
 
Cyber Meaning dealing with computers or computer network. 
 
Security Measure taken to guard agains...
Which is a valid Karel command? 
 
move; 
MOVE 
 
move(); 
move() move(); 
 
What is a street in a Karel world? Row 
 
What is an avenue in a Karel world? Column 
 
If Karel starts at Street 1 and Avenue 3 facing East, what street (row) and avenue (column) will 
Karel be on after this code runs? 
move(); 
move(); 
move(); 
turnLeft();
- Exam (elaborations)
- • 71 pages's •
-
Code HS•Code HS
Preview 4 out of 71 pages
Getting your document ready...
Which is a valid Karel command? 
 
move; 
MOVE 
 
move(); 
move() move(); 
 
What is a street in a Karel world? Row 
 
What is an avenue in a Karel world? Column 
 
If Karel starts at Street 1 and Avenue 3 facing East, what street (row) and avenue (column) will 
Karel be on after this code runs? 
move(); 
move(); 
move(); 
turnLeft();