jossan
Badges: 4
Rep:
?
#1
Report Thread starter 4 years ago
#1
My controlled assessment must be handed in to my teacher by Tuesday next week and I have no idea how to convert VB code into annotated pseudocode, can someone PLEASE help me!!!!
0
reply
TheConfusedMedic
Badges: 21
Rep:
?
#2
Report 4 years ago
#2
(Original post by jossan)
My controlled assessment must be handed in to my teacher by Tuesday next week and I have no idea how to convert VB code into annotated pseudocode, can someone PLEASE help me!!!!
Not sure about the specific details of VB, but pseudocode is basically a mix between Standard English and code.
Selection:
- 'IF ______THEN _______ ELSE'
- 'SELECT CASE OF: _____________ OTHERWISE'
Iteration:
- 'FOR______NEXT'
- 'REPEAT________UNTIL'
- 'WHILE__________ENDWHILE'

Basically, you just want to keep the logic of your program the same, but not use commands that are completely specific to the programming language.

If you have this program (in python):
name = input('What is your name?' )
age = int(input('How old are you?' ))
if age < 18 AND age > 10:
print('welcome to secondary school!',name )
else:
print('you are not welcome, sorry' )

You could convert this to pseudocode:
name <-- INPUT "what is your name?"
age <-- "how old are you?"
IF age < 18 AND age < 10 THEN
OUTPUT 'welcome to secondary school!' + name
ELSE
OUTPUT 'you are not welcome, sorry'
ENDIF

As you can see, it is very similar, but many languages do not use 'print', so in pseudocode, OUTPUT is used instead. Arrows are usually used to display a value being assigned to a variable.
0
reply
X

Quick Reply

Attached files
Write a reply...
Reply
new posts
Back
to top
Latest
My Feed

See more of what you like on
The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

Personalise

Are you travelling in the Uni student travel window (3-9 Dec) to go home for Christmas?

Yes (72)
27.69%
No - I have already returned home (29)
11.15%
No - I plan on travelling outside these dates (54)
20.77%
No - I'm staying at my term time address over Christmas (28)
10.77%
No - I live at home during term anyway (77)
29.62%

Watched Threads

View All