Term
Basic components of a computer and how do they relate to programming? |
|
Definition
1. Processor (CPU) - executes basic instructions 2. Memory -store data and instructions in use (volatile) 3. Storage - ongoing retention of data and programs (long term) 4. Input and Output devices - communicate / interact with users - keyboard/mouse = input and printer/speakers = output |
|
|
Term
Machine code
Assembly language |
|
Definition
MC = computer programming language consisting of binary or hexadecimal instructions which a computer can respond to directly. All languages converted to this.
Assembly language - low level programming language. Developed as not practical to code in machine code. Each instruction corresponds to a machine code instruction. Still not feasible for long or complex programs |
|
|
Term
Two main methods for translating high level source code into machine code |
|
Definition
1. Compilation: entirety of the source code is translated into machine code and an executable file is produced. Relatively slow process however the resulting file runs quickly as it is not translating on the go. eg C and C++
2. Interpretation: an interpreter translates and executes each source code statement one at a time as the program is run. Slower to run but fewer steps involved. Can make changes quickly. Python and PHP |
|
|
Term
What is a computer's OS responsible for and how does it facilitate the execution of the program? |
|
Definition
1. Interfacing with the hardware of a computer + making it available for programs to interact with. 2 - Manage the storage and organisation of data and programs. 3 - Allocating + scheduling the usage of a computer's processor, memory etc so that everything runs smoothly. 4. Managers users and security.
Overall: sits between hardware and programs on a computer. Provides layer of abstraction so that programs can interact w hardware + resources in a consistent way and programmers don't need to implement things from the found up each time. |
|
|
Term
|
Definition
Way to conduct program design (like flowcharts). Tool used to plan out the logic and structure of a programming solution before writing the code. Read by people not programmers but do follow conventions of programming. |
|
|
Term
Draw and define main symbols in flow charts |
|
Definition
Arrow: flowline: direction and connection Rectangle: processing: basic operation, step or action. Oval: Terminator: start or end of flowchart Parralellogram: input / output Diamond: decision (choice with true or false outcomes) Rectangle with lines: predefined function: group of statements that perform a task - might be subject of another flowchart |
|
|
Term
First used high level language for science
First used for business |
|
Definition
Fortran. Still around but not much
COBOL - not written much but in existing programs |
|
|
Term
Writability Readability Reliability Cost |
|
Definition
W- focus on being easy to write (50s and 60s) R- overall simplicity of the language - be read and understood. 1970s Rel - if hard to write and read - prone to errors therefore unreliable cost - always a factor. Time is money, influenced by the other 3 factors. time to learn, time to fix errors, efficiency |
|
|
Term
Key design goals and philosophy of Python |
|
Definition
Elegant, simple and readable
Clean up redundant or inconsistent code |
|
|
Term
|
Definition
Instruction for the computer program to perform an action. Runs statements in the sourcecode from start to end (unless encounters and error) |
|
|
Term
|
Definition
allows you to associate a value with a name. Can then be used in future statements. You can refer to it without knowing the exact value. |
|
|
Term
|
Definition
Description or informative text that is added to the code to help other people understand. Not part of the actual code. |
|
|
Term
|
Definition
Way of abstracting code to make it simpler to program. Can reuse with different parameters throughout the program. eg input() and print() |
|
|
Term
|
Definition
way of joining strings together. May need to convert non-string values before concatenating them. Python print function you can add together otherwise usually use + symbol |
|
|