Programming Flashcards
What is a program?
way of encoding algorithm in a precise enough way for computers to understand the instructions
What do high level programming languages do?
enable us to write program that are portable across different machines – they are closer to human languages
ie. Snap, Scratch, Python, C++, Java, Racket
What does a compiler/interpreter do?
takes a high level language and translates it into something that looks about the same, regardless of which high level language is used
What does an assembler do?
translates from Assembly language to Machine Code
What is an Assembly language?
specific to a particular computer architecture and operating system
What is machine code?
consists of binary or hexadecimal instructions that a computer can respond to directly
What is an algorithm?
precise, systematic method for producing a specified result
What are the 3 components of an algorithm?
sequencing
selection
iteration
What is sequencing?
instructions are executed in the specified order – order matters
- programs will execute exactly in the order that’s given
- if we assign values to variables, they’ll set one value after another, after another
What is a mutation?
updating variables, changing oneself (a step)
What is selection?
allows algorithm to select which instructions to execute depending on conditions
‘if ____, then ____’
‘if ____, then ____, else ____’
‘if [possibility], then you can ____, otherwise, you must ____’
What is iteration?
allows algorithm to repeat instructions
- loop: allows you to do the same thing over and over again, sometimes without a stopping condition, sometimes forever
‘repeat’
‘repeat until…’
‘repeat forever’
What are variables?
named storage location for data (named quantities – name + value)
Communication in Snap!
What is a broadcast?
sprites can send messages to each other
What is iterative design?
engaging in a continuous cycle (design → prototype → evaluate) until you have satisfied user specification