2.2 Programming fundamentals Flashcards
What are the 3 programming fundamentals
Sequence
Selection
Iteration
5 data types
Integer
Real
Float
Boolean
String
What is casting
Changing the data type of something
Cast 1 into int
int(“1”)
Cast 1 into true
bool(1)
Arithmetic operators
*
/
//
%
Assignment operator
=
What is a high-level language
Programming language used by humans
Has to be translated for computers to read
Comparison operators
==
!=
<
>
<=
>=
What is a constant
A variable that does not change
How to concatenate
newString= string1 + “ “ string2
What is concatenation
The conjoining of 2 strings
Example of string manipulation
.upper()
.left()
.length()
What are the boolean operators
And
Or
Not
Not and
Give an example of selection
if then
What does the switch statement do
If statement with one variable