section 2-prgramming Flashcards
languages
languages have functions that manually convert between data types (e.g string_to_int)
data types
integer = whole numbers only real(float) =numbers with decimals boolean = true or false values character = a single letter,number,symbol... string = represents texts
operations
+ addition - subtraction
*multiplication / division
div= whole number mod=remainder
assignment operator
the assignment operator arrow or = is used to assign values to to a variable
comparison operators
are things like equal to ,greater than….
data values
data values can be stores as constants or variables ,
constants and variables need to be declared before use
constants
a constant is assigned to a value at design time
variables
a variable on the other hand can be changed which therefore makes them more useful
strings
strings are a data type made up of characters ,when manipulating strings you start at 0
inputs
inputs can be received from many devices (keyboards ,mouses,webcam….)
outputs
outputs are typically displayed (monitors)
if statements
if statements allow you to check if a condition is true or false.
more complex if statements can be made by putting one if statement inside another one
else if statements
else if statements are used to check multiple conditions and if they give out different outputs
case statements
case statements can check is a variable have specific values
repeat until loop
controlled by a condition or until a condition is true, you get an infinite loop if the condition is never true.
(same as ado until loop)