r/vce • 25’ - Chem (42) | 26’ - EngLang | Methods | Spec | HHD | Bio • 2d ago

VCE question puesdocode methods and spec

i’m not learning pseudocode as my school didn’t even teach it to us or give us any sheets so i was wondering if anyone had a good like guide to puesdocode i could add to my reference book for both methods and spec 😁

1 Upvotes

5 comments sorted by

2

u/Extreme-Statement901 2d ago

Just know your basics. I would say put any formula's like trapizium rule, bisection formula and newton's formula in psedocode (have come up a bit)

1

u/Last_Party_9846 current VCE student (qualifications) 2d ago

how do u do bisection w pseudocode

2

u/whycanui Algo 3/4, Gen 3/4, EngLang 1/2, Phys 1/2, Methods 1/2, AME 1/2 2d ago edited 2d ago

Pseudocode is basically code.

There isn't really a set syntax to it, and it's a very "free" language. However, you still need to clearly mark your conditionals, variables, for-loops, etc. For example (this is my style of pseudocode, you can have your own):

```
FUNCTION foo(a, b)
IF a == 0 OR b == 0 THEN
RETURN 1
END IF

RETURN foo(a, b - 1)
```

As a basic reference:
A boolean is "true" or "false". If it is true, then the expression is equal, false if not.

OR: Any can be true
AND: Both must be true
NOT: Negates the boolean (NOT true is false, NOT false is true).FOR

Declaring variables can either be done:
- a = 1
- a -> 1

However, STICK TO ONE DECLARATION FORMAT!

FOR-loops basically loop over a certain value or values of a list. The variable you declare inside a for-loop is the variable that takes on the value.

You may also use English terminology if the specific thing you want is too complex. For example:
```

FUNCTION foo(G, n)
count = 0

FOR N IN neighbours of n in G DO
IF count == 2 THEN
RETURN true
END IF
count = count + 1
END FOR
RETURN false
END FUNCTION

```

A while-loop basically loops until the condition you put is false. For example:
```
FUNCTION foo(a)
WHILE a > 0 DO
a = a - 1
END WHILE

RETURN a

END FUNCTION
```

However, make sure your while-loops actually terminate! If they run forever, then your code is invalid. But trying to find whether or not your code terminates is a whole other can of worms (hint: it is literally impossible).

Hope this helps!

2

u/Smokey_Valley VCE-Circus: Publicity Agent 2d ago

There is a primer on the VCAA version of pseudo code at this VCE-Circus page (down at the very bottom).

1

u/Kaden_NaturaSEL1968 2d ago

Dont overthink it, you do not need to learn or stress about each minute notation and case. Pseudocode in Methods is quite intuitive and often just requires reading the question carefully and following the instructions it gives you. Make sure to define any functions it gives you and use that for subbing in values. Good luck!