Pseudocode and Writing Algorithms Flashcards

1
Q

Comments

A

//

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

Variables

A

variablename = 3 (int)
variablename = “string” (string)
CONST variablename = 3 (constant)

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

Casting

A

str(20) (casts an integer to a string)
int(“20”) (casts a string to an integer)

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

Input

A

variablename = input()

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

Output

A

print(“Hello”)
print(5)
print(variablename)

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

Selection

A

if… then
elseif… then
else
endif

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

While Loop

A

while…
endwhile

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

For Loop

A

for…
endfor

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

Logical Operators

A

AND
OR
NOT

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

Comparison Operators

A

==
!=
<
<=
>
>=

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

Arithmetic Operators

A

*
/
MOD
DIV

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

String Handling (length, upper, lower)

A

variable.LENGTH (length of a variable)
variable.UPPER (converts to uppercase)
variable.LOWER (convers to lowercase)

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

Sub-routines - creates a function and pass parameters

A

function name(parameters)
return value
endfunction

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

Arrays - use of an array and index

A

arrayname[lengthofarray]
arrayname[1] = “Bob”

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

File Handling

A

OpenWrite(“filename.txt”)
file.ReadLine()
file.WriteLine(variable)
file.Close()

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