Chapter 8 - pseudocode Flashcards
←
features of pseudocode
-all command words are in UPPERCASE
-DECLARE all variables at the start of the code
commenting on code
// this is a comment
// slashes must be added for each line
rules for variables
-has to start with a character
-case insensitive
Poop & poop are the same variables
name 6 data types in pseudocode
-integer
-boolean
-real
-string - delimited by “ “
-character (char) - delimited by ‘ ‘
declaring variables
DECLARE variable: data type
assigning variables
-use ←
eg.
age ← 24
pop ←”poop”
outputting
OUTPUT variable
OUTPUT “hello”, “world”
taking input
OUTPUT “question/ statement”
INPUT variable
eg.
OUTPUT “name?”
INPUT name
arithmetic operation for
-addition
-subtraction
-multiply
-divide
-power
-squared
- +
- -
- *
- /
- ^(1/2)