1 / 5

Session Objectives U2 #S9

Session Objectives U2 #S9 . The order of operations. Similar to BODMAS/BIDMAS in Maths, computing has its own order of precedence. TASK: Copy down the operator precedence table, with examples on p.103 And then test with simple programs in Python i.e x = 3 + 5 * 6 and x = (3 + 5) * 6

alma
Download Presentation

Session Objectives U2 #S9

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Session Objectives U2#S9

  2. The order of operations Similar to BODMAS/BIDMAS in Maths, computing has its own order of precedence. TASK: Copy down the operator precedence table, with examples on p.103 And then test with simple programs in Python i.e x = 3 + 5 * 6 and x = (3 + 5) * 6 NB: It is good practice to use brackets even when the order of precedence is correct as it is easier to understand.,

  3. Key Words (Operators & Operands) Binary Boolean Assignment Arithmetic Unary Relational

  4. Operators and Operands Numeric data which is to be manipulated in an arithmetic operation is called an operand. The action or manipulation to be done is called the operator i.e x = a + b (a and b are the operands and + is the operator) This example has 2 operands and these are called binary operators. Some have only one operand (either before or after) these are called unaryoperators. e.g–m is the unary operator for negation or negative m

  5. Applying operators to an algorithm Attempt to create algorithms to solve Task 2 of the programming project.

More Related