Chapter 3: Selection Structures: Making Decisions

Slides:



Advertisements
Similar presentations
Decision Structures - If / Else If / Else. Decisions Often we need to make decisions based on information that we receive. Often we need to make decisions.
Advertisements

Solving Equations A Solution
Fundamental of C programming
Chapter 13 Control Structures. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display Control Structures Conditional.
Evaluate expressions with grouping symbols
Exponents, Parentheses, and the Order of Operations.
 2008 Pearson Education, Inc. All rights reserved JavaScript: Control Statements I.
Chapter 4 Control Structures I. Objectives ► Examine relational and logical operators ► Explore how to form and evaluate logical (Boolean) expressions.
Tutorial 4 Decision Making with Control Structures and Statements Section A - Decision Making JavaScript Tutorial 4 -Decision Making with Control.
Commutative and Associative Properties
Translating Word Phrases into Algebraic Expressions or Equations
Scientific Notation Review
Base: the number that is multiplied Power: the number that is expressed as the exponent Exponent: tell how many times the base is used as a factor Standard.
COMPUTER PROGRAMMING. Control Structures A program is usually not limited to a linear sequence of instructions. During its process it may repeat code.
Bell Ringer = – 5 = = ÷ -2 = =6. -7 – (-7) = After you have completed the bell ringer, take out your homework!
Chapter 4 Selection Structures: Making Decisions.
Copyright © 2012, 2009, 2005, 2002 Pearson Education, Inc. Chapter 2 Fractions.
Make sure yours is correct BEFORE you glue!!. any of the numbers that are added together a step by step solution to a problem the answer to a subtraction.
Computer Science: A Structured Programming Approach Using C1 Objectives ❏ To understand how decisions are made in a computer ❏ To understand the logical.
Test Review Chapter 1 Test Part Write the words that represent a - 10 A) a number less than ten B) ten decreased by a number C) a number increased.
Write the following statement as a mathematical expression using parenthesis and brackets and then evaluate. 51. Multiply 5 by 3.From this product.
Pseudocode. Simple Program Design, Fourth Edition Chapter 2 2 Objectives In this chapter you will be able to: Introduce common words, keywords, and meaningful.
Evaluating a Variable Expression To evaluate a variable expression:
Basic Control Structures
Divide. Evaluate power – 3 = – 3 EXAMPLE – 3 = 3 2 – – 3 = 6 – 3 Multiply. Evaluate expressions Multiply and divide from.
Chapter 8 – Exponents and Exponential Functions 8.1/8.3 – Multiplication and Division Properties of Exponents.
PROPERTIES OF EXPONENTS

1-2 Order of Operations and Evaluating Expressions.
8 th Grade Math Chapter 2 Review. Chapter 2 Review 1)Use >, < or = to compare a) -7 < 7 b) -3 < -1 □ □
Holt CA Course 1 1-4Properties of Numbers Vocabulary.
Holt CA Course 1 1-4Properties of Numbers AF1.3 Apply algebraic order of operations and the commutative, associative, and distributive properties to evaluate.
Course Properties Learn how to identify properties of rational numbers and use them to simplify numerical expressions.
CSCI N201: Programming Concepts Copyright ©2005  Department of Computer & Information Science Working with Selection Structures.
Algebra 1 Chapter 2 Section : Solving One-Step Equations An equation is a mathematical statement that two expressions are equal. A solution of an.
Holt CA Course 1 1-4Properties of Numbers Warm Up Warm Up California Standards Lesson Presentation Preview.
Powers and Laws of Exponents SWBAT write the standard form for numbers that are given in exponential form; write the exponential form for numbers that.
The Order of Operations Chapter Evaluate inside grouping symbols ( ), { }, [ ], | |, √ (square root), ─ (fraction bar) 2.Evaluate exponents 3.Multiply.
I’m Thinking of a Number
Addition Multiplication Subtraction Division. 1.If the signs are the same, add the numbers and keep the same sign = = If the.
CHAPTER 4 Negative Numbers. ADDITION AND SUBTRACTION USING NEGATIVE NUMBERS A number line is very useful when you have to do additions or subtractions.
Unit 1 Lessons 2&3 Solving Equations by Adding, Subtracting, Multiplying, or Dividing Standards: CC.9-12.A.REI.1, CC.9-12.A.REI.3, CC.9-12.A.CED.1 EQ:
1-2 Order of Operations Objective: Use the order of operations to evaluate expressions.
Chapter 10 Polynomials and Factoring. Entry Task 04/09/2013.
Write, Interpret and Use Mathematical Expression and Equations.
ORDER OF OPERATIONS. 1.Perform any operations with grouping symbols. 2.Simplify powers. 3.Multiply and divide in order from left to right. 4.Add and subtract.
 Very often when you write code, you want to perform different actions for different decisions. You can use conditional statements in your code to do.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and.
The Complex Number System. 1. Write each expression as a pure imaginary number. (similar to p.537 #26)
Algebra 1 Mini-Lessons Which answer choice is equivalent to the expression below? MA.912.A.6.2: Add, subtract, multiply, and divide radical expressions.
Decisions Chapter 4.
Preview Warm Up California Standards Lesson Presentation.
Addition/ Subtraction
Multiply the following rational expressions. Show work!
Control Structures.
Divide the number in C by 10.
Conditional Statements
Objective Use multiplication properties of exponents to evaluate and simplify expressions.
Chapter 3: Lesson 3 Order of Operations
Chapter 3: Selection Structures: Making Decisions
Boolean Expressions to Make Comparisons
Subtract the same value on each side
Program Flow.
Selection Structures: Single-alternative
Chapter 4-2 Power and Exponents
Chapter 3: Selection Structures: Making Decisions
Selection—Making Decisions
Multiply and divide Expressions
Evaluating Expressions
Bell Work!!! Directions: Write out the exponent in word form. 3^6 6^4
Presentation transcript:

Chapter 3: Selection Structures: Making Decisions

Case-type Statements Case or Switch statements can be used to more easily code multiple alternative If’s Use the special or keyword Case Use Select to start the Case statement Specify the expression to be evaluated List each possible value of the expression and what to do if that is that value is the true one A Break at the end of each Case tells the computer to skip the rest of the conditions Use End Case to end the statement The results will be the same as a correctly coded multiple-alternative If-Then-Else structure

Example Select Case of Choice Case 1: Set Operation = “Add” Break Set Operation = “Subtract” Case 3: Set Operation = “Multiply” Case 4: Set Operation = “Divide” End Case

Any Questions ?