NEW
Font size
WorksheetsProgramming Basics: Statements & Functions
Total questions: 21
Worksheet time: 11mins
What was developed to abstract away many of the low-level details of machine code?
better RAM
hard drives
programming languages
the ALU
Just like spoken languages, programming languages have individual complete thoughts called ___
statements
syntax
assignments
conditionals
The set of rules that govern the structure and composition of statements in a language is called ___
statement writing
syntax
initialization
assembly code
The statement “a = 5” is what kind of programming language statement?
syntax error
assignment statement
control flow statement
conditional statement
What is the best practice for naming variables?
all lower case single letters
element symbols
whatever we want
as things that make sense
In the computer game, who swatted the bugs trying to get into the Harvard Mark 1?
Grace Hopper
Alan Turing
Ada Lovelace
John von Neuman
Setting the beginning value of a certain variable is known as ___
"initializing" the variable
"setting and forgetting"
"setting" the floor
"anchoring" the variable
What is the most common kind of Control Flow Statement?
IF statements
WHILE loops
ELSE statements
FOR loops
Which type of statement is like a fork in the road?
IF statement
WHILE loop
ELSE statement
function
An IF statement depends on whether an expression is true or false, so it is deemed a ___
Conditional Statement
Declarative Statement
Initialized Value
RETURN statement
The lines of code that are conditional on the if-statement are nested between the IF and ___
END
EXIT
RETURN
END IF
Which statement acts as a catch-all if the expression following an IF statement is false?
an OVERFLOW statement
a NOT statement
an ELSE statement
an OTHER statement
What kind of loop will repeat a piece of code as long as a certain expression is true?
an IF loop
a WHILE loop
a NEXT loop
a FOR loop
In an assignment statement, which side of the equal sign is analyzed first?
the left side
the right side
the side with the longer expression
the side with the shorter expresssion
Which kind of loop isn't based on a condition, but is count-controlled?
an IF loop
a WHILE loop
a NEXT loop
a FOR loop
To compartmentalize and hide complexity, programming languages can package pieces of code into ___
fragments
snippets
functions
compartments
In different programming languages, functions might also be called ___
snippets or bits
methods or subroutines
parts or fragments
smidgens or morsels
Which statement was used to send the result of the exponent code back to the part of the program that requested it?
a RECOVERY statement
a NEXT statement
an END statement
a RETURN statement
When we call a single line of code where the complexity is hidden, it’s not magic, it’s the power of ___
contemplation
reflection
abstraction
detachment
In modern programming, it’s uncommon to see functions longer than around ___
5 lines of code
10 lines of code
50 lines of code
100 lines of code
Modern programming languages come with huge bundles of pre-written functions, called ___
Modularized Code
Libraries
Stacks
Code Collections
