5.03 Apply operators and Boolean expressions

Slides:



Advertisements
Similar presentations
Factors and Prime Numbers When two or more numbers are multiplied to give a certain product, each number is called a factor of the product. The numbers.
Advertisements

Order of Operations with Exponents and Integers
5.1 Algebraic Expressions. CAN YOU FOLLOW ORDER OF OPERATIONS?
How do you simplify using order of operations and exponents? Section 1-2.
Order of Operations & Evaluating Expressions. Review: Order of Operations Please- Parentheses Excuse- Exponents My- Multiplication Dear- Division Aunt-
COMPUTER PROGRAMMING I SUMMER Apply operators and Boolean expressions.
COMPUTER PROGRAMMING I SUMMER Apply operators and Boolean expressions.
Order of Operations ( ) + X . The Order of Operations tells us how to do a math problem with more than one operation, in the correct order.
Integrated Mathematics Order of Operations. Remember the Phrase Order of Operations Parentheses - ( ) or [ ] Parentheses - ( ) or [ ] Exponents or Powers.
Bell Work 4m 8m 5m 12x 5 6x Write an expression in simplest form that will solve for the perimeter of each of the triangles. 6x x 18x + 5 8m +4m.
COMPUTER PROGRAMMING I SUMMER Apply operators and Boolean expressions.
Doing math In java.
Section 1.3 Order of Operations. Evaluate Is your answer 33 or 19? You can get 2 different answers depending on which operation you did first.
9.3 Order of Operations.
PS Algebra I.  when simplifying an expression, this is the procedure you must use: 1) simplify any grouping symbols found within the expression (grouping.
Operators.
1.3 Order of Operations ( ) + X . The Order of Operations tells us how to do a math problem with more than one operation, in the correct order.
Order of Operations. What is a numerical expression? A numerical expression is a mathematical phrase that includes only numbers and operation symbols.
A number sentence is a short way of writing a mathematical expression. EXAMPLE I could write: eight plus six equals fourteen or I could write it this way:
Everyday Math Grade 4 – Lesson 3.9 Parentheses in Number Sentences Copyright © 2010 Kelly Mott.
Evaluate Is your answer 33 or 19? You can get 2 different answers depending on which operation you did first. We want everyone to get the same.
THE ORDER OF OPERATIONS 1-2. VOCABULARY… 1.Order of Operations – a. Work inside grouping symbols ( ) or [ ] b. Simplify any terms with exponents 3 2 c.
Order of Operations C. N. Colón Algebra I St. Barnabas HS Bronx, NY.
Algebra 1 Notes: Lesson 1-2: Order of Operations
Do Now: Evaluate
5.03 Apply operators and Boolean expressions
Exponents and Order of Operations
Order of Operations.
Simplifying Expressions; Order of Operations
43 Order of Operations  ( ) + - X.
43 Order of Operations  ( ) + - X.
Order of Operations ÷ + - X.
Please Excuse My Dear Aunt Sally
1.1 words and expressions Objective: Students should be able to demonstrate they know the order of operations and how to apply it. They should know what.
43 Order of Operations  ( ) + - X.
Exponents and Order of Operations
Please Excuse My Dear Aunt Sally
Objective The student will be able to:
43 Order of Operations  ( ) + - X.
43 Order of Operations  ( ) + - X.
Evaluating Expressions
43 Order of Operations  ( ) + - X.
Objective The student will be able to:
Objective The student will be able to:
43 Order of Operations  ( ) + - X.
43 Order of Operations  ( ) + - X.
PEMDAS MATH MADE EASY.
Order of Operations.
Order of Operations STES.
Order of Operation.
Order of Operations 1-2 Objective: Students will evaluate numerical expressions and algebraic expressions using the order of operations. S. Calahan 2008.
43 Order of Operations  ( ) + - X.
Sec 1.1 – Order of Operations
Objective The student will be able to:
Order of Operations PEMDAS.
Objective The student will be able to:
Objective The student will be able to: use the order of operations to evaluate expressions.
43 Order of Operations  ( ) + - X.
Objective The student will be able to:
Objective The student will be able to:
43 Order of Operations  ( ) + - X.
43 Order of Operations  ( ) + - X.
I can USE THE ORDER OF OPERATIONS USE GROUPING SYMBOLS.
Objective The student will be able to:
43 Order of Operations  ( ) + - X.
43 Order of Operations  ( ) + - X.
43 Order of Operations  ( ) + - X.
43 Order of Operations  ( ) + - X.
43 Order of Operations  ( ) + - X.
Presentation transcript:

5.03 Apply operators and Boolean expressions Computer Programming I

Objective/Essential Standard Essential Standard: 5.00 Apply Programming & Conditional Logic Indicator: 5.03 Apply operators and Boolean expressions. (3%)

Operators What are operators? Welcome back to Math class! Operators are the symbols we use for performing math. You have used them since early in life. There are several types of operators. Basic Math operators, Boolean and Relational Operators. We will use all of these in programing. For now let’s look at the math operators.

Basic Math Operators These you are familiar with: + (add), - (subtract) / (divide) * (multiply) ^ (Exponents) There are 2 other types of division in programming: \ integer division - returns the integer portion of the quotient. Mod (Modulus division) - returns the remainder portion of the division.

More on the 3 Types of Division Regular division Rounds the decimal portion if assigned to an integer. Show the decimal portion if assigned to a double. This is the division with which you are most familiar. Integer division cuts off the decimal portion and returns just the integer ( \ ) Modulus division returns the remainder portion of the quotient (mod)

Order of Operations Just as in math, Please Excuse My Dear Aunt Sally describes the precedence applied to math in programming Parentheses Exponents Multiply – from left to right Divide (NOTE: Division will be complete in the order in which it appears in the problem, no ranking with division types.) Add– from left to right Subtract– from left to right

Examples Using Familiar Operators dblResult + dblResult = 3 + 4 7 - dblResult = 4 – 3 1 * dblResult = 3 * 4 12 *, + dblResult = 3 * 4 + 5 17 *, +, ( ) dblResult = 3 * (4 + 5) 27 ^, * dblResult = 2^3 * 6 48

Relational Operators Used to create a Boolean expression One that evaluates to True or False Note: the default (initial) value of a Boolean Expression is false Visual Basic Relational Operators > greater than < less than >= greater than or equal to <= less than or equal to = equal to <> not equal to

Truth Tables Truth tables show the possible outcomes of combining any two boolean expressions using the AND operator OR, or the NOT operator. Here’s an example using AND

Writing Boolean Expressions Below is a DeskCheck (table of possible outputs): Relational Operator Boolean Expression Result >, intNum = 4 intNum > 6 False >, intNum = 8 True <, intNum = 7 intNum < 10 >=, intNum = 6 intNum >= 6 <=, intNum = 6 intNum <= 6 <>, intNum = 6 intNum <> 6

Wrap Up In this short PowerPoint we looked at some of the different operators can be used in Visual Basic. For more information on arithmetic operators http://msdn.microsoft.com/en-us/library/b6ex274z(v=VS.80).aspx For more information on relational operators https://msdn.microsoft.com/en-us/library/dya2szfk.aspx And https://msdn.microsoft.com/en-us/library/wz3k228a.aspx