Programming Techniques Flashcards
1
Q
What are the 3 programming constructs?
A
Sequence, Selection, Iteration
2
Q
What is Sequence?
A
• Do one statement after the other in order
3
Q
What is Selection?
A
• Do a set of statements based on a condition, allow your code to make choices
4
Q
What is Iteration?
A
• Do a set of statements again and again
5
Q
What is a Count Controlled loop?
A
• Do a set of statements again and again a known (fixed) number of times
6
Q
What is a Condition Controlled loop?
A
• Do a set of statements again and again until a given condition is met
7
Q
What is a Local variable?
A
- Declared and used inside a sub-routine, only available to that routine
- Created when routine is called and destroyed when it ends
8
Q
What is a Global variable?
A
- Declared at the top of a program outside of sub-routines
- Usable throughout the program
- Created when program starts, destroyed when it ends
9
Q
What features does an IDE supply?
A
- Code editors: A text area used for programmers to enter code directly into the IDE. Often comes with additional features such as syntax h
- Error diagnostics: A feature which reports errors in the code and potential problems along where they are found and often suggestions on how to fix it
- Run-time environments: Software to support the execution and running of programs. IT allows the developer to run their code during development in order to check for logical errors.
- Translators: A program which converts high-level or assembly-level code into executable machine code by either compiling it or interpreting it