Python Pseudocode
Python Pseudocode
else: ELSE
/// ///
ENDIF
ENDIF
PYTHON vs PSUEDOCODE
IGCSE COMPUTER SCIENCE 0478
Python (case-sensitive) Pseudocode
For Loop For Loop
This loop would start from 0 and end at 9 This loop would start from 0 and end at 10
For Loop For Loop
NEXT val
ENDFOR
This loop would start from 2 and end at 9 This loop would start from 2 and end at 10
For Loop For Loop
NEXT val+2
ENDFOR
This loop would start from 1, end at 10 and This loop would start from 1, end at 10 and
increment the loop variable var by 2 instead of 1. increment the loop variable var by 2 instead of 1.
PYTHON vs PSUEDOCODE
IGCSE COMPUTER SCIENCE 0478
Python (case-sensitive) Pseudocode
In order to end the For loop for a condition In order to end the For loop for a condition
ENDIF
NEXT val
ENDFOR
For loop terminates as soon as you enter a negative For loop terminates as soon as you enter a negative
value otherwise finishes for 10 iterations value otherwise finishes for 10 iterations
While loop While loop
[1,5,3] [1,5,3]
Reading a value from array Reading a value from array
Writing a value into the array Writing a value into the array