Chapter 2 Flashcards
Low level versus high level lang
low level : move bits of data around high level : abstract primitives like pop up menu provided by the designer
general versus targeted to an application
refers to how widely applicable a language’s primitive operations are. IE adobe flash is made for web animation/interactivity
interpreeted vs compiled
compiled: a language is executed directly with source code similar to machine code interpreted: converted from source into machine level primitive operations
statement
or a command ie : print “print print”
scalar object types
integers (int 4 -1337 ) floating point numbers (float 1.46 and 1.5E6 {i.5*10^6) Boolean (bool) True or False) aaand None
integer division
// returns quotient without remainder
modulo
or mod or in python:: i % j returns remainder of i divided by j
a and b
if both are True then True otherwise False
a or b
if at least one of a or be is true then True otherwise False
not a
True if a is false and False if a is True
straight line programs
execute one statement after another in the order in which they appear then stop
conditional statement
if boolean expression:
block of code
else :
block of code
constant time
a program for which the maximum running time is bounded by the length of the program is said to run in constant time (runnning time does not grow with the size of the input to the program)