Computer Science PseudocodeWatch
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!!!!
- 'IF ______THEN _______ ELSE'
- 'SELECT CASE OF: _____________ OTHERWISE'
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 )
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
OUTPUT 'you are not welcome, sorry'
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.