Chapter 8 - pseudocode Flashcards

1
Q

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

features of pseudocode

A

-all command words are in UPPERCASE
-DECLARE all variables at the start of the code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

commenting on code

A

// this is a comment
// slashes must be added for each line

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

rules for variables

A

-has to start with a character
-case insensitive
Poop & poop are the same variables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

name 6 data types in pseudocode

A

-integer
-boolean
-real
-string - delimited by “ “
-character (char) - delimited by ‘ ‘

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

declaring variables

A

DECLARE variable: data type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

assigning variables

A

-use ←
eg.
age ← 24
pop ←”poop”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

outputting

A

OUTPUT variable
OUTPUT “hello”, “world”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

taking input

A

OUTPUT “question/ statement”
INPUT variable
eg.
OUTPUT “name?”
INPUT name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

arithmetic operation for
-addition
-subtraction
-multiply
-divide
-power
-squared

A
  • +
  • -
  • *
  • /
  • ^(1/2)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly