Computer Science- Test 1 Flashcards
(49 cards)
analog
continuous, real numbers
digital
discrete, integers
Donald Knuth
“CS is not new, it was present in ancient Babylon. The only difference is our luck to have powerful computational machines.”
.txt
very simple, no margins or a lot of options
white space
enter/ tab/ space
transistors
a switch ( 1- on, 0- off)
Infix
(3+2)
prefix
(+ 3 2 )
postfix
3 2 +
Ctrl + Alt + T
opens up terminal
$ & >
commands
exit from a software
Ctrl + D
Alt + 4
Ctrl + Q
Ctrl + W
Cancels a process
Ctrl + C
Ctrl + Z
Run (DrRacket)
Ctrl + T
highlight
Ctrl + A
Variable
a name used to refer to a location in memory
Variable Naming
- case sensitive
- no whitespace
- letters and numbers are ok, but can’t begin with #
- avoid symbols
Interpretation of (define x 6)
create a variable, name it x, and store the value 6 in it
Bottom Pane of DrRacket
- Interaction
- immediate results, 1 expression at a time
Top Pane of DrRacket
- definitions
- nothing happens until “Run”
- permanent
- all expression evaluated when you click “Run”
- black highlighting
program
a list of instructions to be executed by a computer; computer executes the first instruction then proceeds to execute instructions in sequential order until it reaches the last instruction, where it stops
programming languages allow
- clarity
- precision
- specificity
- probability
- uniformity
function call (f a b c)
f = name of function; a, b, c = arguments/parameters/inputs
interpretation of (define myfxn (lambda (a b c) ()
create a procedure taking inputs a, b, and c, doing , and name it myfxn