Coding Test Flashcards
Why design a programming language?
To give a machine instructions
What is wrong with our language?
Implied
Contradictions
Words with multiple meanings
How to remove ambiguities?
Specific and limited syntax
Not many words
What happens when you reduce the number of commands?
Increase flexibility
Makes harder to use
Functions and abstraction
Functions take a list of commands and call it one thing
Are functions reusable?
Yes
Functions and the user
Functions allow the user to clean up the code
visually more pleasing and helpful
Function or loop? Repetition
Loop
Function or loop? Parameters
Function
Function or loop? Call
Function
Abstraction and teams
I can use Ferris’s code without knowing how it works
Can get blocks of code online
Algorithm
A precise sequence of instructions and processes that can be executed by the computer
Sequencing
is the application of each step of an algorithm in the order in which the statements are given.
Selection
uses a Boolean condition (a TRUE/FALSE condition) to determine which of two parts of an algorithm is used.
Iteration
the repetition of part of an algorithm until a condition is met for a specified number of times
Function def.
A piece of code that you can easily call over and over again
Abstraction
Giving functionality to higher level protocols without needing to know how the lower level protocols work
API
A collection of commands that are available to the coder
Documentation
A description of the behavior of the functions
Parameter
An extra piece of information that you pass to the function to customize it for a specific need.
Loop def.
A programming construct that repeats a group of commands
Iteration (other def)
“loop” by another name - the repetition of a statement, process, or procedure.
For loop
For Loop - A particular kind of looping construct provided in many languages. Typically, a for loop defines a counting variable that is checked and incremented on each iteration in order to loop a specific number of times.