Operators 3 Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is While loop in pseudocode?

A

WHILE condition
block of statements
ENDWHILE

i.e.

WHILE not_guessed
number

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

How do you define a subroutine in pseudocode?

A

SUBROUTINE
identifier(parameters)
block of statements
ENDSUBROUTINE

i.e.
SUBROUTINE add(1, b)
answer

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

How do you use return in a function in pseudocode?

A

RETURN value

i.e. RETURN awnser

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

How do you call a subroutine in pseudocode?

A

identifier(parameters)

i.e.
add(3, 4)

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

How do you do assignment in pseudocode?

A

identifier

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

How do you access an item in pseudocode?

A

identifier[index]
i.e.
animal[0]

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

How do you update an item on pseudocode?

A

identifier[index]

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

How do you length of list on pseudocode?

A

LEN(identifier)

i.e.

LEN(animals)

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

How do you do length of string on pseudocode?

A

LEN(identifier)

i.e.
LEN(word)

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

How do you do index of character in pseudocode?

A

identifier.INDEX(char)

i. e.
word. INDEX(“L”)

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

How do you get the character to a location on pseudocode?

A

identifier[index]

i.e.

word[0]

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

How do you do substring on pseudocode?

A

identifier[index:index]
Identifier[index:]
identifier[:index]
i.e.

word[1:3]
word[1:]
word[:3]

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