Shared Flashcard Set

Details

Week 5
programming principles
8
Computer Science
Post-Graduate
11/09/2017

Additional Computer Science Flashcards

 


 

Cards

Term
source code
Definition
collection of statements (instructions) for program to run - usually from start to end (unless encounters error)

Written using human-readable programming language. Then converted to machine code to run
Term
statement
Definition
instruction within a program for it to perform a specific action
Term
syntax
Definition
correct order specific to each language so that the source code can be understood. Sort of like grammar
Term
variables
Definition
associate a value with a name so that you can use it

global and local (inside functions)
Term
comments
Definition
explanatory notes - not part of code. help others (and the author) understand it
Term
Give some examples of situations where the data type of a variable influences how it can be used.
Definition
- maths on integers/floats makes sense, not on string of text
-different languages follow different rules whether data types have to be coerced or can be done automatically

weakly typed - implicit)
strongly typed (explicit)
eg concatenating strings and numbers
Term
Describe the concept of "control structures", and give examples of selection and iteration statements.
Definition
selection statements and loop or iteration statements. Code runs based on conditions rather than start to finish.

Selection statements run on Boolean expression or condition being True

counter-controlled or condition-controlled loops (number of iterations specified or loop while condition is true)
Term
Expression
Definition
An expression is essentially anything in a programming language that can be “evaluated” into some kind of result,
Supporting users have an ad free experience!