Introduction to programming Flashcards
data types
integer
float
string
boolean
how to change data types
use built in functions such as
int()
str()
arithmetic operators
+ - / *
// or INT in psuedocode:
gives the result of a division rounded down to the nearest whole number
% or MOD in psuedocode:
gives the remainder as an integer
** or ^ in psuedocode
raises one number to the power of another
what are the relational operators and what do they do
= - equals
!= - not equal to
> - greater than
< - less than
<= - less than or equal to
>= - greater than or equal to
they compare two expressions and produce a boolean expression .
what are the boolean operators and what do they do
and
or
not
they join boolean expressions to create larger boolean expressions
what are the 3 basic program structures
sequence
selection
iteration
what are the names for a selection structure
branching
conditional
key words used in selection structures
if
else
elif
switch
case
what are the two types of loop
counter - controlled loop (for loop)
condition controlled loop (while loop)
Abstraction
- remove unnecessary details
- replace features with simplified symbols
- makes prog easier to write and reduces need for resources like processing and memory
Syntax error
break rules of the programming language
Run - time error
program tried to do an impossible thing such as divide by zero