SlideShare a Scribd company logo
2
Most read
© International Baccalaureate Organization 2012
Approved notation for developing
pseudocode
Diploma Programme
Approved notation for developing pseudocode
When developing pseudocode teachers must use the symbols below, which are those used in
mathematics.
This information should be distributed to candidates as close as possible to the commencement of teaching
of the course. This notation sheet will be available to candidates during the external examinations.
Conventions Variable names are all capitals, for example, CITY
Pseudocode keywords are lower case, for example, loop, if …
Method names are mixed case, for example, getRecord
Methods are invoked using the “dot notation” used in Java, C++, C#, and
similar languages, for example, BIGARRAY.binarySearch( 27 )
Variable names These will be provided and comments // used, for example:
N = 5 // the number of items in the array
SCOREHISTORY,getExam( NUM ) // get the student’s score on exam NUM
Assigning a value to a
variable
Values will be assigned using = , for example:
N = 5 // indicates the array has 5 data items
VALUE[0] = 7 // assigns the first data item in the array a value of 7
Output of information Output—this term is sufficient to indicate the data is output to a printer,
screen, for example:
output COUNT // display the count on the screen
Symbol Definition Examples
= is equal to X = 4, X = K If X = 4
> is greater than X > 4 if X > 4 then
>=
is greater than or equal
to
X >= 6 loop while X >= 6
< is less than VALUE[Y] < 7 loop until VALUE[Y] < 7
<= is less than or equal to VALUE[] <=12 if VALUE[Y] <= 12 then
≠ not equal to X ≠ 4, X ≠ K
AND logical AND A AND B if X < 7 AND Y > 2 then
OR logical OR A OR B if X < 7 OR Y > 2 then
NOT logical NOT NOT A if NOT X = 7 then
mod modulo 15 mod 7 = 1 if VALUE[Y] mod 7 = 0 then
div integer part of quotient 15 div 7 = 2 if VALUE[Y] div 7 = 2 then
Operation Flowchart example Pseudocode example
sequential
operations
perform task1
perform task2
conditional
operations
if MAX > 0 then
output “positive”
else
output “not positive”
end if
while-loop
loop while COUNT < 15
COUNT = COUNT + 1
end loop
from/to-loop
loop COUNT from 0 to 5
SUM = SUM + COUNT
end loop
YES
NO
NO
YES
YES
perform task1
perform task2
MAX > 0?
output “positive” output “not positive”
NO
COUNT < 15? COUNT = COUNT + 1
COUNT = 0
SUM = SUM + COUNT
COUNT = COUNT + 1
COUNT > 5?

More Related Content

DOCX
Basis grafik
DOCX
Basic graphics
PPTX
Alg2 lesson 9-1
PDF
BASICS OF COMPUTER PROGRAMMING-TAKE HOME ASSIGNMENT 2018
PDF
8th PreAlg - L77--April26
PPTX
Cs1123 5 selection_if
PDF
PLSV & PtLSV (Perkalian & Pembagian Aljabar) - P4
PPTX
October 23, 2013
Basis grafik
Basic graphics
Alg2 lesson 9-1
BASICS OF COMPUTER PROGRAMMING-TAKE HOME ASSIGNMENT 2018
8th PreAlg - L77--April26
Cs1123 5 selection_if
PLSV & PtLSV (Perkalian & Pembagian Aljabar) - P4
October 23, 2013

Similar to Cs psuedocode-basics-v4 (20)

PPTX
A Deep Dive into C++ Arrays: Understanding its with Code Examples
PDF
Numerical Methods for Engineers 6th Edition Chapra Solutions Manual
PDF
"How was it to switch from beautiful Perl to horrible JavaScript", Viktor Tur...
PPT
FP 201 Unit 2 - Part 3
PPT
Class 8 Lecture Notes
PPT
11-ScriptsAndConditionals.ppt
PPT
11ScriptsAndConditionalsinpython1234.ppt
PDF
04-Intro-SQL database management systems
PDF
R Programming: Comparing Objects In R
PPT
Scripts And Conditionals in javaScripts And Conditionals in java
PDF
Chapter 5 exercises Balagurusamy Programming ANSI in c
KEY
Why ruby
PPTX
Kpi driven-java-development-fn conf
PPTX
Performing calculations using java script
PDF
Arrays in C
PPT
Ruby: OOP, metaprogramming, blocks, iterators, mix-ins, duck typing. Code style
PPTX
Draw the flowchart of the above algorithm.pptx
PPTX
RUBY PROGRAMMINGRUBY PROGRAMMING RUBY PROGRAMMING
PPTX
Bikalpa_Thapa_Python_Programming_(Basics).pptx
PPTX
A Deep Dive into C++ Arrays: Understanding its with Code Examples
Numerical Methods for Engineers 6th Edition Chapra Solutions Manual
"How was it to switch from beautiful Perl to horrible JavaScript", Viktor Tur...
FP 201 Unit 2 - Part 3
Class 8 Lecture Notes
11-ScriptsAndConditionals.ppt
11ScriptsAndConditionalsinpython1234.ppt
04-Intro-SQL database management systems
R Programming: Comparing Objects In R
Scripts And Conditionals in javaScripts And Conditionals in java
Chapter 5 exercises Balagurusamy Programming ANSI in c
Why ruby
Kpi driven-java-development-fn conf
Performing calculations using java script
Arrays in C
Ruby: OOP, metaprogramming, blocks, iterators, mix-ins, duck typing. Code style
Draw the flowchart of the above algorithm.pptx
RUBY PROGRAMMINGRUBY PROGRAMMING RUBY PROGRAMMING
Bikalpa_Thapa_Python_Programming_(Basics).pptx
Ad

Recently uploaded (20)

PDF
Complications of Minimal Access Surgery at WLH
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
RMMM.pdf make it easy to upload and study
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PPTX
Cell Structure & Organelles in detailed.
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
GDM (1) (1).pptx small presentation for students
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
A systematic review of self-coping strategies used by university students to ...
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
Complications of Minimal Access Surgery at WLH
Final Presentation General Medicine 03-08-2024.pptx
RMMM.pdf make it easy to upload and study
Abdominal Access Techniques with Prof. Dr. R K Mishra
Chinmaya Tiranga quiz Grand Finale.pdf
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
Cell Structure & Organelles in detailed.
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
VCE English Exam - Section C Student Revision Booklet
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
FourierSeries-QuestionsWithAnswers(Part-A).pdf
GDM (1) (1).pptx small presentation for students
Module 4: Burden of Disease Tutorial Slides S2 2025
2.FourierTransform-ShortQuestionswithAnswers.pdf
Supply Chain Operations Speaking Notes -ICLT Program
Pharmacology of Heart Failure /Pharmacotherapy of CHF
A systematic review of self-coping strategies used by university students to ...
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
Ad

Cs psuedocode-basics-v4

  • 1. © International Baccalaureate Organization 2012 Approved notation for developing pseudocode Diploma Programme
  • 2. Approved notation for developing pseudocode When developing pseudocode teachers must use the symbols below, which are those used in mathematics. This information should be distributed to candidates as close as possible to the commencement of teaching of the course. This notation sheet will be available to candidates during the external examinations. Conventions Variable names are all capitals, for example, CITY Pseudocode keywords are lower case, for example, loop, if … Method names are mixed case, for example, getRecord Methods are invoked using the “dot notation” used in Java, C++, C#, and similar languages, for example, BIGARRAY.binarySearch( 27 ) Variable names These will be provided and comments // used, for example: N = 5 // the number of items in the array SCOREHISTORY,getExam( NUM ) // get the student’s score on exam NUM Assigning a value to a variable Values will be assigned using = , for example: N = 5 // indicates the array has 5 data items VALUE[0] = 7 // assigns the first data item in the array a value of 7 Output of information Output—this term is sufficient to indicate the data is output to a printer, screen, for example: output COUNT // display the count on the screen Symbol Definition Examples = is equal to X = 4, X = K If X = 4 > is greater than X > 4 if X > 4 then >= is greater than or equal to X >= 6 loop while X >= 6 < is less than VALUE[Y] < 7 loop until VALUE[Y] < 7 <= is less than or equal to VALUE[] <=12 if VALUE[Y] <= 12 then ≠ not equal to X ≠ 4, X ≠ K AND logical AND A AND B if X < 7 AND Y > 2 then OR logical OR A OR B if X < 7 OR Y > 2 then NOT logical NOT NOT A if NOT X = 7 then mod modulo 15 mod 7 = 1 if VALUE[Y] mod 7 = 0 then div integer part of quotient 15 div 7 = 2 if VALUE[Y] div 7 = 2 then
  • 3. Operation Flowchart example Pseudocode example sequential operations perform task1 perform task2 conditional operations if MAX > 0 then output “positive” else output “not positive” end if while-loop loop while COUNT < 15 COUNT = COUNT + 1 end loop from/to-loop loop COUNT from 0 to 5 SUM = SUM + COUNT end loop YES NO NO YES YES perform task1 perform task2 MAX > 0? output “positive” output “not positive” NO COUNT < 15? COUNT = COUNT + 1 COUNT = 0 SUM = SUM + COUNT COUNT = COUNT + 1 COUNT > 5?