Operators 2 Flashcards

1
Q

How do you put output in pseudocode?

A

OUTPUT

e.g. OUTPUT age

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

What do you put for converting to another data type?

A

STRING ()
INTEGER ()
FLOAT ()

e.g. STRING (age)

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

What do you put for If?

A

IF condition THEN
block of statements
ENDIF

e.g.

IF answer is equal to guess THEN
OUTPUT “Correct!”
ENDIF

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

What do you put for IF, ELSE?

A
IF condition THEN
    block of  statements
ELSE
    block of statements
ENDIF
E.G.
IF answer is equal to guess THEN
    OUTPUT “Correct!”
ELSE
    OUTPUT “Incorrect!”
ENDIF
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What do you put for If, elif, else?

A
IF condition THEN
    block of statements
ELSEIF condition THEN
block of statements
ELSE
    block of statements
END IF

e.g.

IF answer is equal to 5 THEN
    OUTPUT “Correct!”
ELSEIF answer is equal to 6
OUTPUT “Almost”
ELSE
    OUTPUT "Incorrect!"
ENDIF
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is For Loop in Pseudocode?

A

FOR … in … to …
block of statements
ENDFOR

i.e.
FOR i = 1 to 10
OUTPUT i
ENDFOR

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