Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
33 Cards in this Set
- Front
- Back
computer science includes
|
mathematics-formal notations, logic
engineers-building systems, designing scientists-observe, make hypothesis, test |
|
computer scientist must be good in problem solving
|
state problem clearly
think of solutions (including thinking out of box) state solution clearly |
|
what is algorithm?
|
step by step list of instruction to solve a problem
|
|
one example of algorithm
|
Euclid's algorithm for GCD
|
|
primary memory (RAM)
|
volatile(lost contents if power interrupted)
fast(nanoseconds) expensive(per MB or GB) |
|
secondary storage (HD, CD, DVD, memory stick)
|
not volatile
million times slower than RAM (milliseconds) cheaper (perGB) |
|
capacity unit
|
byte
|
|
1 KB = bytes
1MB = KB = bytes |
1024 = 2^10
1024 = 2^20 |
|
speed unit in computer
|
Hertz (Hz) = 1 cycle per second
|
|
1 MHz = Hz
1 GHz = Hz |
1 million
1 billion |
|
first computer were glorified calculator--characteristics
|
had a store which held data to work on
instructions had to be entered manually in front panel, switches or cables very slow but more accurate than humans |
|
John Von Neumann's idea
|
put instructions in "store" RAM so that computer can access them as fast as mechanically possible
|
|
after RAM idea
|
suddenly computers were faster and multi-purpose
change the program in memory and change behavior of the machine all machine built after that are called von Neumann machines both instructions and data are in the RAM when processed |
|
low level language
|
machine language or assembly language
|
|
machine language
|
binary = patterns of 0 and 1
very close to how the machine hardware works, many small steps |
|
high level language
|
more like people think
portable |
|
example of language level----telling a robot to get out of a room
|
machine language = take a step, raise arm, grasp knob, turn knob,.....
assembly language = leave through door high level language = get outta here!!! |
|
compiler
|
source code => object code(executable) --- it doesn't execute
|
|
interpreter
|
read, translate, and execute a program piece by piece
|
|
why interpreter is considered easier to develop in?
|
can get faster feedback on code, try things out more easily than a compiled language
|
|
component of IDE
|
editor, translator, linker, loader, debugger
|
|
creator of python
|
Guido van Rossum
|
|
python named after
|
Monty Python's Flying Circus
|
|
two modes in python
|
shell--simple execution
program mode--an editor |
|
codelens in textbook
|
more or less like a debugger
step by step execution of a program shows variables as changed only works on preprogrammed examples |
|
program
|
a sequence of instructions of how to perform computation
|
|
bug
|
syntax, runtime, and semantics error
|
|
syntax error
|
syntax = rules about the structure of a program
will not run until the error is found interpreter will find them in the programming language |
|
runtime error
|
happens during the running of the program
called an exception (big read message in python interpreter) ex. file is missing, wrong data type given by user, dividing by zero value |
|
semantic error
|
error in meaning
runs but give incorrect result testing with known input and output is the only way to find this |
|
natural languages
|
human languages
ambiguous redundant |
|
formal languages
|
artificial(notations) strict in syntax, have to be precisely stated
not ambiguous(not supposed to be) not redundant |
|
comments
|
# totally ignored by the interpreter
used to explain the actions to a reader |