stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Programming Concepts Flashcards | StudBud
Explore
/
Programming Concepts
Programming Concepts
17 terms
·
StudBud Administration
·
22 plays
Imported from external platform
Flashcards
17 cards
F
Practice quiz
P
Host live
L
Questions
17
Answers
1
What is an Algorithm?
A programming term used to describe how a computer works
A set of instructions for solving a problem
A program that tells Karel how to jump a hurdle
A way to create a network of computers
2
What is top-down design (decomposition)?
A way to organize commands
This is how browsers read programs
This is how Karel builds towers
A way to break down a big problem into smaller problems
3
For Loops...
Create new commands
Are single step, on word instruction
Execute a section of code if a condition is true
Repeat a section of code a fixed number of times
4
Before you can call a function, you must first...?
Repeat the function
Make the function work
Comment on the function
Define the function
5
What is a function?
Allows a section of code to be repeated
None of the above
A way to create a new command
Helps programmers focus on a section of code
6
While Loops...
Repeat a section of code as long as a condition is true
Executes a section of code if a condition is true or does something else
Create commands
Repeat a command a fixed number of times
7
Rules for defining a function...
Name should start with a letter
Commands go between brackets
All of the above
Name should describe what the function does
8
Allow you to avoid repeat code...
Functions
Commands
Brackets
Algorithm
9
How do you write a single-line comment?
/*Karel will move and take ball*/
//Karel will turn right and jump the hurdle
/*Karel will turn and face east
/Karel will check to see if front is clear
10
Which is
not
a Karel Command?
move();
putBall();
putBall;
turnLeft();
11
Why is it important to include comments in your code?
I'm not sure, it is a waste of time
Comments give Karel instructions on what to do
Comments are a way to leave notes about what your code is doing
Comments help your code run without bugs
12
All commands end with "();"
True
False
13
If/Else statements...
Repeat a section of code as long as a condition is true
Repeat a section of code a fixed number of times
Execute a section of code if a condition is true or do something else
Create new commands
14
The goal is to write a program using the least amount of lines...
False
True
15
How would you call this function?
Makepancakes();
putBall();
makepancakes();
makePancakes();
16
What is the purpose of a start function?
A way to make programs easier to understand
A way to organize programs
A place to put all defined commands
All of the above
17
Functions are spelled with a capital "F"
False
True