Unit 3 Notes Section 5 Learning Objective: For relationships between two variables expressions or values- write expressions using relational operators

Essential Knowledge: -A Boolean Value is either true or false -The exam reference sheet provides the following relational operators:=,≠,>,<,≥, and≤. These are used to test the relationship between two variables, expressions, or values. A comparison using a relational operator evaluates to a Boolean value. For example, a=b evaluates to true if a and ba are equal otherwise it evaluates to false

Learning Objective: Represent a step-by-step algorithmic process using sequential code statements

Essential Knowledge: -Sequencing is the application of each step of an algorithm in the order in which the code statements are given -A code statement is a part of program code that expresses an action to be carried out -A expression can consist of a value, a variable, an operator, or a procedure call that returns a value -Expressions are evaluated to produce a single value -The evaluation of expressions follows a set order of operation defined by the programming language -Sequential statements execute in the order they appear in the code segment -Clarity and readability are important considerations when expressing an algorithm in a programming language

Learning Objective: Evaluate expressions that use arithmetic operators

Essential Knowledge:

-Arithmetic operators are part of most programming languages and include addition, subtraction, multiplication, division, and modulus operators -The exam reference sheet provides a MOD b, which evaluates to the remainder when a is divide by b. Assume that a is an integer greater than or equal to 0 and b is an integer greater than 0. For example, 17 MOD 5 evaluates to 2 -The order of operations used in mathematics applies when evaluating expressions. The MOD operator has the same precedence as the * and / operators

Section 6 Learning Objective: Express an algorithm that uses selection without using a programming language

Essential Knowledge: -Selection determines which part of an algorithm are executed based on a condition being true or false

Learning Objective: For selection-a.write conditional statements, b.determine the result of conditional statements

Essential Knowledge: -Conditional statements, or “if-statements,” affect the sequential flow of control by executing different statements based on the value of a Boolean expression

Section 7 Learning Objective:For nested selection-a. Write nested conditional statements, b.determine the result of nested conditional statements

Essential Knowledge: -nested conditional statements consist of conditional statements within conditional statements

Brainstorming Hacks Create a step-by-step algorithmic process using sequential code statements and evaluate Write a nested conditonal statement and determine the result of the statements