ISF DP Computer Science

Common Issues #

Code that won’t even run #

Here are some possible causes for code that does nothing (but should do something):

Conditional: Missing keyword then #

Double check that all if and else if statements have the keyword then included.

if HAPPY = true then
   output "I'm happy!"
else if HAPPY = false then
   output "Not happy :("
end if

Loop or Conditional: Missing end #

All conditionals and loops must have an end statement.

if HAPPY = true then
   output "I'm happy!"
end if //DONT FORGET THIS!
loop I from 1 to 10
   output I
end loop //DONT FORGET THIS!

Incorrect Keywords #

UseDon’t Use
ANDand
ORor

Code that partially runs, then stops #

Incorrect Variable Names #

If you accidentally misspelled your variable name one time, it could cause your program to stop mid-way

NUMBER = 10
NUMBR = NUMBR + 1 // your code will stop here

Incorrect Boolean or null #

UseDon’t Use
trueTrue
falseFalse
nullNone

You used else then #

When using else, you do not need then.

if X < 0 then
   output "Negative"
else then // THIS WILL NOT WORK
   output "Not negative"
end if

Code that crashes the pseudocode website #

There is only one cause for this, and that is a infinite while loop. Double check that your while loop will eventually end.

// this loop will never end. the program will crash
X = 3
loop while X > 0
   if X % 2 = 0 then
      X = X-1
   end if
end loop

Issue not listed here? #

👾 💬

If you found an possible issue that wasn’t included in this page, but should be, let us know about it and we’ll add it to this page.