in solving a problem. be referred to by their identifier. LINK Abstraction, connecting computational thinking and program design, introduction to programming. then the algorithm can execute a pre-written command instead of the programmer writing lots of code.s For example, if the language contains a SUM command for adding up an array, then it's not necessary to write a loop. Instead, just write : ANSWER = SUM(NUMBERS) Thinking logically 4.1.4 Identify when is required in a specified situation. 2 Links to procedural procedures. TOK Reasoning as a form of LINK Connecting computational thinking and program design, introduction to programming. In PSEUDOCODE, decisions are written as IF...THEN… In FLOW-CHARTS, use a Diamond to represent a decision. 4.1.5 Identify the decisions required for the solution to a specified problem. 2 Different actions are taken based on conditions. LINK Connecting computational thinking and program design, introduction to programming. AIM 4 Applying thinking skills to identify and resolve a specified complex problem. Common decisions are: Strings : if ANSWER = "YES" then… Numbers : if AGE > 21 then … Boolean : if FOUND = TRUE then ... 4.1.6 Identify the condition associated with a given decision in a specified problem. 2 Testing conditions, iteration. Identifying and constructing the conditions—AND, OR, NOT relationships—Boolean tests. LINK Connecting computational thinking and program design, introduction to programming. Compound BOOLEAN conditions us AND, OR, NOT For example : if AGE >= 13 AND AGE <=18 then SCHOOL = "High School" end if if = "SAT" OR TODAY = "SUN" then output "Weekend" end if if NOT( PASSWORD = "magic" ) then output "Wrong Password"
4.3 introduction to programming (13 hours) Assessment statement Ob Teacher’s notes Explanations and Examples Nature of programming languages 4.3.1 State the fundamental operations of a computer. 1 These include: add, compare, retrieve and store data. Complex capabilities are composed of very numbers of very simple operations. ADD means numerical addition This is referring to Machine Code - the language that a CPU actually understands = NATIVE code 4.3.2 Distinguish between fundamental and compound operations of a computer. 2 For example, “find the largest” is a compound operation. Add accumulator plus 1 → fundamental Store accumulator into memory → fundamental Storing 1,3,5,7,...,99 → compound (uses a loop) Comparing two Strings → compound, as it must loop through the Strings and compare many individual characters 4.3.3 Explain the essential features of a computer language. 3 For example, fixed vocabulary, unambiguous meaning, consistent grammar and syntax. TOK Language and meaning. English is not a computer language because meaning is NOT unambiguous - for example "store" has several different meanings Example computer languages: Java, Javascript, Python, Fortran, Basic, C++ 4.3.4 Explain the need for higher level languages. 3 For example, as the human needs for computer systems have expanded it is necessary to abstract from the basic operations of the computer. It would take far too long to write the type of systems needed today in machine code. High Level code is easier to write, as one single command like output ARRAY might print out 100 numbers, but low level languages require a loop for this task. High Level code may provide more sophisticated concepts, like Object Oriented Programming, that make programming easier and quicker and more reliable
method firstLetter(s) return s.substring(0,1) end method Output: Dave Debbie 4.3.11 Construct algorithms using the access methods of a collection. 3 LINK Connecting computational thinking and program design. See the examples in 4.3.12 Discuss the need for and collections within programmed solutions. 3 Show an understanding of the usefulness of reusable code and program organization for the individual programmer, team members and future maintenance. LINK General principles of computational thinking, connecting computational thinking and program design. MYP Technology: use of software such as Alice. Too bad that IB Pseudocode contains no facility for writing methods or sub-programs. 4.3.13 Construct algorithms pre-defined arrays and/or collections. 3 MYP Mathematics: using flow charts to solve problems in real-life contexts, logic, algorithms. MYP Technology: design cycle (inputs, processes, outputs, feedback, iteration); use of software such as Alice. Students will only be required to analyse flow charts in the externally assessed components. Students will be expected to write and analyse pseudocode in the See the examples in