Pseudocode Flashcards

1
Q

How do you declare a subroutine with pseudocode?

A

Declare Name

End Subroutine

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

How do you call a subroutine in pseudocode?

A

call Name

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

How do you delare and use arrays in pseudocode?

A

myarray[99]

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

How do you do literal outputs in pseudocode?

A

output “blah blah blah”

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

How do you do variable names in pseudocode?

A

myvariable

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

How do you define variable data types in pseudocode?

A

myvariable is integer

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

How do you assign a value in pseudocode?

A

Set counter = 0

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

How do you do a selection in pseudocode?

A

if…
else…
…end if

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

How do you do an annotation in pseudocode?

A

{some annotation}

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

How do you do repetition in pseudocode?

A

for i…next i

repeat. ..until
do. ..loop
do. ..while
while. ..repeat

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

How do you get the length of a string in pseudocode?

A

len(string)

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

How do you replace part of a string in pseudocode?

A

Replace(string, find, replacewith)

E.g. txt = “have a happy birthday”
Message = replace(txt, “happy”, “fantastic”)

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

How do you do division in algorithm?

A

DIV

11 DIV 2 = 5

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

How do you do modulo division in algorithm?

A

MOD

11 MOD 2 = 1

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