exam 1 Flashcards
algorithm
finite steps to solve a problem
three major errors in programming?
syntax, logical (= instead of ==), runtime (infinity loop)
program
implementation of an algorithm to solve a program
variable
name of the location of a memory
parts of a variable?
variable name and data type
smallest unit of memory
bit
byte = __ bits
byte = 8 bits
int has how many bytes?
int has 4 bytes
5 parts of a computer
CPU, main memory, input (keyboard, mouse, etc.), output (monitors, printers, etc.), secondary memory
compiler
converts program into machine level language so instructions can be read and executed by computer
statement
an instruction to be carried out by the computer
difference between do while and while loop
do while will execute at least once, while may not execute at all if conditions are false/unmet
use double when?
real numbers (1.3, 100.23, etc)
use int when?
integers (7, 16, etc.)
+, -, /, * for….
for integers or real numbers