Pseudocode Flashcards

1
Q

To make a comment

A

//bla bla

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

Putting an input into a variable

A

name=input(“What’s your name”)

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

Manipulating string, taking middle characters from a word

A

MID(X,X)

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

MOD

A

Gives remained when you have divided

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

DIV

A

Give the factor when divided

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

Round to two decimal places

A

round(answer,2)

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

2^5 in pseudocode

A

2**5

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

convert string to integer

A

Int(“”)

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

convert integer/float to string

A

Str()

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

covert string to float

A

float(“”)

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

bigger or equal too

A

> =

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

assigning a variable equals

A

=

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

comparative equal

A

==

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

is not equal

A

!=

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

While loop

A

while answer!=”computer”
answer=input(“What is the password?”)
Endwhile

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

repeat until loop

A

repeat
answer=input(“What is the password?”)
until answer==”computer”

17
Q

switch/case

A
switch entry: 
case “A”: print(“You selected A”) 
case “B”:1 print(“You selected B”) 
default: print(“Unrecognised selection”)
 endswitch