AQA Decision 1 Algorithms. Section 1: Communicating an algorithm

Size: px
Start display at page:

Download "AQA Decision 1 Algorithms. Section 1: Communicating an algorithm"

Transcription

1 AQA Decision 1 Algorithms Section 1: Communicating an algorithm Notes and Examples These notes contain subsections on Flow charts Pseudo code Loops in algorithms Programs for the TI-83 graphical calculator Flow charts Although flow charts are not specifically required by the syllabus, it is useful to understand how they work. Drawing a flow chart first can help you to write instructions for an algorithm. It s useful to be aware of the box convention used for drawing flowcharts. A flowchart may have circular boxes to start and end the process it describes. Rectangular boxes contain instructions to be carried out on the variables in the problem Diamond shaped boxes are used for questions/decisions. The route followed from such boxes depends on the outcome. Boxes with curved corners are used for inputs and outputs. Example 1 uses a flow chart to express an algorithm. Example 1 Draw a flowchart to divide one number by another using repeated subtraction. The output should be the quotient and the remainder. 1 of 7 10/01/13 MEI

2 Start Read x, y N = 0 x < y? No x = x y N = N + 1 Yes Output N, x N is being used to count the number of subtractions you have done. End When x < y you cannot subtract any more, and the value of x is the remainder. Pseudo code (pseudo English) An algorithm is simply a set of precise instructions. Although in this chapter (and throughout Decision Maths 1) you will be working through algorithms by hand, in real life algorithms are usually programmed into computers. Pseudo code (sometimes called pseudo English) is a kind of halfway step between instructions given in English and a computer program. If you have had any experience with programming computers (you may have used LOGO or another turtle graphics program to draw patterns in late primary or early secondary school, or you may have programmed a graphic calculator) you will know that there are many different programming languages and that these are constantly evolving. However, there are common elements to most programming languages: values are assigned to variables; loops allow you to repeat the same instruction more than once; the values of variables are compared. Pseudo code allows you to write instructions in the form similar to a computer program without having to worry too much about using the correct language and syntax. Two different people would probably write different versions of pseudo code for the same task, but would both be able to understand what the other has written. It is a bit like text messaging: you want to express things as concisely as possible but clearly enough that anyone can understand what you are communicating. 2 of 7 10/01/13 MEI

3 Line numbers are often given when using pseudo code: this can be useful when using the GOTO statement. Line numbers are often given as multiples of 10: this means that if you need to add an extra instruction between existing lines you do not need to renumber everything! Some useful instructions for psuedo code: INPUT Indicates that the user must provide a number that the algorithm is to process. PRINT The algorithm here produces a result (the output of the algorithm) LABEL This provides a reference point (e.g. LABEL X means that you are labelling this point in the algorithm X. You can then use GOTO X). GOTO This makes the algorithm jump to a different point. You can just use a line number here (e.g. GOTO 40), or you can label a point (X, say) and then use GOTO X this approach means that if you change line numbers then you do not need to change the GOTO instruction. LET This assigns a number to a variable (e.g. LET N = 1). You can also use LET to add to existing variables (e.g. LET N = N + 1 adds 1 to the existing value of N, and LET N = N + X adds the current value of X to the current value of N, and assigns the new value to N). IF THEN This means just what it does in normal English. After the IF is a statement (e.g. IF X = Y), and after the THEN is an instruction (e.g. THEN GOTO A). If the statement is true then the algorithm follows the instruction after the THEN; if it is not true then the algorithm proceeds to the next line.) STOP This signals the end of the algorithm. END Sometimes used instead of STOP. Example 2 below shows how the algorithm in Example 1 can be expressed in pseudo code; remember, however, that there are many other ways it could be written. Example 2 (i) Use pseudo code to write instructions to divide one number by another using repeated subtraction. The output should be the quotient and the remainder. (ii) Use the pseudo code to produce a trace table to divide 134 by 12, and give the output. (i) 10 INPUT X 20 INPUT Y 30 LET N = 0 40 LABEL A 50 IF X < Y THEN GOTO B 60 LET X = X Y 70 LET N = N + 1 X is the dividend (the number you are dividing) and Y is the divisor (the number that you are dividing by) When X < Y you cannot subtract any more, and the value of X is the remainder. 3 of 7 10/01/13 MEI

4 80 GOTO A 90 LABEL B 100 PRINT N 110 PRINT X 120 STOP N is the quotient and X is the remainder. (ii) X Y N The output is 2, 11 (i.e. the quotient is 11 and the remainder is 2). Compare the pseudo code in Example 2 with the flowchart in Example 1: you will see that the process is the same. Loops in algorithms In Example 2, an IF THEN command and GOTO commands were used to produce a loop. An alternative approach is a FOR NEXT loop. FOR NEXT loops are useful tools in many algorithms, so it is important that you understand how they work. Below are a couple of examples with some notes to explain how they work. Example 3 shows a simple FOR NEXT loop. Example 3 Write a set of instructions to print the first three square numbers. 10 FOR I = 1 to PRINT I 30 NEXT I This program will print out 1 on the first circuit of the loop, 4 on the second circuit and 9 on the third and final circuit. 4 of 7 10/01/13 MEI

5 The instruction FOR I = 1 to 3 means go through the loop between FOR and NEXT with I = 1, then I = 2, then I = 3. The instruction PRINT I 2 is within the loop and so is carried out each time the loop is followed, so 1, 4 and 9 get printed out. Example 4 shows a nested FOR NEXT loop, in which one loop is inside another. Example 4 (i) Write a set of instructions to calculate the sum of (ii) Give a trace table for the algorithm. 2 3 r r r for r = 1 to r = 3. (i) 10 LET X = 0 20 FOR I = 1 to 3 30 FOR J = 1 to 3 40 J LET A = I 50 LET X = X + A 60 NEXT J 70 NEXT I 80 PRINT X (ii) X I J A The J loop is nested within the I loop. Every time the I loop is followed, the J loop is followed 3 times. The instruction PRINT X is outside the loops and so only occurs once all of the loops have been completed. Programs for the TI-83 graphical calculator Programming a graphical calculator to carry out simple algorithms like the ones in this chapter is quite easy. The programming language used varies from one make of calculator to another, but they are all quite similar to pseudo code so are easy to learn. It is well worth trying some programming, as this will help your understanding of pseudo code and flowcharts. 5 of 7 10/01/13 MEI

6 If you would like to try some programming, here are some ideas. 1. Program your calculator to find the roots of a quadratic equation. Write the program so that if there are no real solutions, the calculator displays the message No real solutions. 2. Zeller s algorithms finds the day of the week for any date (it is the subject of Exercise 9A Question 5 in the Oxford textbook). Here are the instructions for Zeller s algorithm: Let day number = D, month number = M, year = Y. If M is 1 or 2 add 12 to M and subtract 1 from Y. Let C be the first two digits of Y and let Y be the last two digits of Y. Add together the integer parts of (2.6M 5.39), (Y /4) and (C/4), then add on D and Y and subtract 2C. Find the remainder when this quantity is divided by 7. If the remainder is 0 the day was a Sunday, if it is 1 a Monday, etc. Try Zeller s algorithm yourself for a few dates, such as today s date or your date of birth. Then try programming your calculator to perform the algorithm. On the following pages are programs for the TI-83 for the algorithms above. Try programming them yourself before looking at the programs. If you have a different make of graphical calculator, you should be able to adapt the programs by referring to your calculator manual. Quadratic Equation Formula A program for the TI-83 graphical calculator. QUADRATIC EQUATION SOLVER Displays the roots of a quadratic equation or suitable message if the discriminant is negative. ClrHome Disp "QUADRATIC" Disp " " Prompt A,B,C B 2-4AC D If D>0 Then Disp (-B+ (D))/(2A) Disp (-B- (D))/(2A) Else Disp "NO REAL ROOTS" End 6 of 7 10/01/13 MEI

7 Examples If A = 1, B = 3 and C = -2, then the answers displayed are and If A = 1, B = 1 and C = 1, then the message displayed is NO REAL ROOTS. Zeller s Algorithm A program for the TI-83 graphical calculator. ZELLER S ALGORITHM Enter a date in the form day:month:year and display the day of the week. ClrHome Disp "ZELLER" Disp "------" Disp "DAY OF THE WEEK" Prompt D,M,Y If M<3 Then M+12 M Y-1 Y End int((y/100) C Y-100C X int((2.6m- 5.39)+int((X/4)+int((C/4)+ D+X-2C S S-7int(S/7) Z If Z=0:Disp "SUNDAY" If Z=1:Disp "MONDAY" If Z=2:Disp "TUESDAY" If Z=3:Disp "WEDNESDAY" If Z=4:Disp "THURSDAY" If Z=5:Disp "FRIDAY" If Z=6:Disp "SATURDAY" Example If D = 21, M = 3 and Y = 1950, then the day is TUESDAY. 7 of 7 10/01/13 MEI

The Further Mathematics Support Programme

The Further Mathematics Support Programme The Further Mathematics Support Programme Algorithms An algorithm is a precise set of instructions which is used to accomplish a specific process. We come across algorithms in every-day life, for example:

More information

PROGRAM DESIGN TOOLS. Algorithms, Flow Charts, Pseudo codes and Decision Tables. Designed by Parul Khurana, LIECA.

PROGRAM DESIGN TOOLS. Algorithms, Flow Charts, Pseudo codes and Decision Tables. Designed by Parul Khurana, LIECA. PROGRAM DESIGN TOOLS Algorithms, Flow Charts, Pseudo codes and Decision Tables Introduction The various tools collectively referred to as program design tools, that helps in planning the program are:-

More information

Using Variables to Write Pattern Rules

Using Variables to Write Pattern Rules Using Variables to Write Pattern Rules Goal Use numbers and variables to represent mathematical relationships. 1. a) What stays the same and what changes in the pattern below? b) Describe the pattern rule

More information

CS 199 Computer Programming. Spring 2018 Lecture 2 Problem Solving

CS 199 Computer Programming. Spring 2018 Lecture 2 Problem Solving CS 199 Computer Programming Spring 2018 Lecture 2 Problem Solving ALGORITHMS AND FLOWCHARTS A typical programming task can be divided into two phases: Problem solving phase produce an ordered sequence

More information

1. Answer: x or x. Explanation Set up the two equations, then solve each equation. x. Check

1. Answer: x or x. Explanation Set up the two equations, then solve each equation. x. Check Thinkwell s Placement Test 5 Answer Key If you answered 7 or more Test 5 questions correctly, we recommend Thinkwell's Algebra. If you answered fewer than 7 Test 5 questions correctly, we recommend Thinkwell's

More information

Example 2: Simplify each of the following. Round your answer to the nearest hundredth. a

Example 2: Simplify each of the following. Round your answer to the nearest hundredth. a Section 5.4 Division with Decimals 1. Dividing by a Whole Number: To divide a decimal number by a whole number Divide as you would if the decimal point was not there. If the decimal number has digits after

More information

Lecture 9. Monday, January 31 CS 205 Programming for the Sciences - Lecture 9 1

Lecture 9. Monday, January 31 CS 205 Programming for the Sciences - Lecture 9 1 Lecture 9 Reminder: Programming Assignment 3 is due Wednesday by 4:30pm. Exam 1 is on Friday. Exactly like Prog. Assign. 2; no collaboration or help from the instructor. Log into Windows/ACENET. Start

More information

Alternate Appendix A: Using the TI-92 Calculator

Alternate Appendix A: Using the TI-92 Calculator Alternate Appendix A: Using the TI-92 Calculator This document summarizes TI-92 calculation and programming operations as they relate to the text, Inside Your Calculator. Even those who do not read the

More information

Programming Language. Control Structures: Selection (switch) Eng. Anis Nazer First Semester

Programming Language. Control Structures: Selection (switch) Eng. Anis Nazer First Semester Programming Language Control Structures: Selection (switch) Eng. Anis Nazer First Semester 2018-2019 Multiple selection choose one of two things if/else choose one from many things multiple selection using

More information

GRADE 1 SUPPLEMENT. March Calendar Pattern C7.1

GRADE 1 SUPPLEMENT. March Calendar Pattern C7.1 GRADE 1 SUPPLEMENT Set C7 Geometry: Describing 3-D Shapes Calendar Pattern Includes March Calendar Pattern C7.1 Skills & Concepts H identify, name, and describe 3-D shapes in isolation and in everyday

More information

Algebra 2 Semester 1 (#2221)

Algebra 2 Semester 1 (#2221) Instructional Materials for WCSD Math Common Finals The Instructional Materials are for student and teacher use and are aligned to the 2016-2017 Course Guides for the following course: Algebra 2 Semester

More information

Math Glossary Numbers and Arithmetic

Math Glossary Numbers and Arithmetic Math Glossary Numbers and Arithmetic Version 0.1.1 September 1, 200 Next release: On or before September 0, 200. E-mail edu@ezlink.com for the latest version. Copyright 200 by Brad Jolly All Rights Reserved

More information

Seventh Grade Spiraling Review Week 1 of First Six Weeks

Seventh Grade Spiraling Review Week 1 of First Six Weeks Week of First Six Weeks Note: Record all work in your math journal. Day Indicate if each of the given numbers below is equivalent to, less than, or greater than. Justify each response. 0.0, 0 4.7, %,,

More information

1 Starting with your cursor in cell A1, press the TAB key on your keyboard.

1 Starting with your cursor in cell A1, press the TAB key on your keyboard. Page 11 Entering data 1 Starting with your cursor in cell A1, press the TAB key on your keyboard. 2 With the cursor in B1, press the Caps Lock key and enter the word BREAKFAST 3 Press the TAB key and enter

More information

Computer Programming: Skills & Concepts (CP) arithmetic, if and booleans (cont)

Computer Programming: Skills & Concepts (CP) arithmetic, if and booleans (cont) CP Lect 5 slide 1 Monday 2 October 2017 Computer Programming: Skills & Concepts (CP) arithmetic, if and booleans (cont) Cristina Alexandru Monday 2 October 2017 Last Lecture Arithmetic Quadratic equation

More information

DECISION CONTROL AND LOOPING STATEMENTS

DECISION CONTROL AND LOOPING STATEMENTS DECISION CONTROL AND LOOPING STATEMENTS DECISION CONTROL STATEMENTS Decision control statements are used to alter the flow of a sequence of instructions. These statements help to jump from one part of

More information

GCSE-AS Mathematics Bridging Course. Chellaston School. Dr P. Leary (KS5 Coordinator) Monday Objectives. The Equation of a Line.

GCSE-AS Mathematics Bridging Course. Chellaston School. Dr P. Leary (KS5 Coordinator) Monday Objectives. The Equation of a Line. GCSE-AS Mathematics Bridging Course Chellaston School Dr (KS5 Coordinator) Monday Objectives The Equation of a Line Surds Linear Simultaneous Equations Tuesday Objectives Factorising Quadratics & Equations

More information

Chapter 1 An Introduction to Computer Science. INVITATION TO Computer Science 1

Chapter 1 An Introduction to Computer Science. INVITATION TO Computer Science 1 Chapter 1 An Introduction to Computer Science INVITATION TO Computer Science 1 Q8. Under what conditions would the well-known quadratic formula not be effectively computable? (Assume that you are working

More information

Math Analysis Chapter 1 Notes: Functions and Graphs

Math Analysis Chapter 1 Notes: Functions and Graphs Math Analysis Chapter 1 Notes: Functions and Graphs Day 6: Section 1-1 Graphs Points and Ordered Pairs The Rectangular Coordinate System (aka: The Cartesian coordinate system) Practice: Label each on the

More information

School Year:

School Year: School Year: 2010 2011 1 McDougal Littell CA Math Algebra 1 Pacing Guide Begin First Semester During the first two weeks of school, teachers will work with students on study skills and diagnostic assessments

More information

Sail into Summer with Math!

Sail into Summer with Math! Sail into Summer with Math! For Students Entering Math C This summer math booklet was developed to provide students in kindergarten through the eighth grade an opportunity to review grade level math objectives

More information

Skill 1: Multiplying Polynomials

Skill 1: Multiplying Polynomials CS103 Spring 2018 Mathematical Prerequisites Although CS103 is primarily a math class, this course does not require any higher math as a prerequisite. The most advanced level of mathematics you'll need

More information

Math 1: Solutions to Written Homework 1 Due Friday, October 3, 2008

Math 1: Solutions to Written Homework 1 Due Friday, October 3, 2008 Instructions: You are encouraged to work out solutions to these problems in groups! Discuss the problems with your classmates, the tutors and/or the instructors. After working doing so, please write up

More information

Math Analysis Chapter 1 Notes: Functions and Graphs

Math Analysis Chapter 1 Notes: Functions and Graphs Math Analysis Chapter 1 Notes: Functions and Graphs Day 6: Section 1-1 Graphs; Section 1- Basics of Functions and Their Graphs Points and Ordered Pairs The Rectangular Coordinate System (aka: The Cartesian

More information

CW Middle School. Math RtI 7 A. 4 Pro cient I can add and subtract positive fractions with unlike denominators and simplify the result.

CW Middle School. Math RtI 7 A. 4 Pro cient I can add and subtract positive fractions with unlike denominators and simplify the result. 1. Foundations (14.29%) 1.1 I can add and subtract positive fractions with unlike denominators and simplify the result. 4 Pro cient I can add and subtract positive fractions with unlike denominators and

More information

Problem Solving. Problem Solving Concept for Computer Science

Problem Solving. Problem Solving Concept for Computer Science Problem Solving Problem Solving Concept for Computer Science by Noor Azida Binti Sahabudin Faculty of Computer Systems & Software Engineering azida@ump.edu.my OER Problem Solving by Noor Azida Binti Sahabudin

More information

Properties and Definitions

Properties and Definitions Section 0.1 Contents: Operations Defined Multiplication as an Abbreviation Visualizing Multiplication Commutative Properties Parentheses Associative Properties Identities Zero Product Answers to Exercises

More information

line graphs Primes time. This time series graph shows median incomes in the UK from 1980 to The factors of a number are any whole numbers

line graphs Primes time. This time series graph shows median incomes in the UK from 1980 to The factors of a number are any whole numbers PROBABILITY NUMBER Factors, multiples and primes Line graphs Median income ( s) A time series graph is a line graph that shows how a variable changes over a period Factors and multiples Primes time. This

More information

Other conditional and loop constructs. Fundamentals of Computer Science Keith Vertanen

Other conditional and loop constructs. Fundamentals of Computer Science Keith Vertanen Other conditional and loop constructs Fundamentals of Computer Science Keith Vertanen Overview Current loop constructs: for, while, do-while New loop constructs Get out of loop early: break Skip rest of

More information

Math 171 Proficiency Packet on Integers

Math 171 Proficiency Packet on Integers Math 171 Proficiency Packet on Integers Section 1: Integers For many of man's purposes the set of whole numbers W = { 0, 1, 2, } is inadequate. It became necessary to invent negative numbers and extend

More information

Math 202 Test Problem Solving, Sets, and Whole Numbers 19 September, 2008

Math 202 Test Problem Solving, Sets, and Whole Numbers 19 September, 2008 Math 202 Test Problem Solving, Sets, and Whole Numbers 19 September, 2008 Ten questions, each worth the same amount. Complete six of your choice. I will only grade the first six I see. Make sure your name

More information

Unit-II Programming and Problem Solving (BE1/4 CSE-2)

Unit-II Programming and Problem Solving (BE1/4 CSE-2) Unit-II Programming and Problem Solving (BE1/4 CSE-2) Problem Solving: Algorithm: It is a part of the plan for the computer program. An algorithm is an effective procedure for solving a problem in a finite

More information

MIT AITI Python Software Development

MIT AITI Python Software Development MIT AITI Python Software Development PYTHON L02: In this lab we practice all that we have learned on variables (lack of types), naming conventions, numeric types and coercion, strings, booleans, operator

More information

Lecture 3 MATLAB programming (1) Dr.Qi Ying

Lecture 3 MATLAB programming (1) Dr.Qi Ying Lecture 3 MATLAB programming (1) Dr.Qi Ying Objectives Data types Logical operators/functions Branching Debugging of a program Data types in MATLAB Basic: Numeric (integer, floating-point, complex) Logical:

More information

Math 083 Final Exam Practice

Math 083 Final Exam Practice Math 083 Final Exam Practice Name: 1. Simplify the expression. Remember, negative exponents give reciprocals.. Combine the expressions. 3. Write the expression in simplified form. (Assume the variables

More information

Please write your name and username here legibly: C212/A592 6W2 Summer 2017 Early Evaluation Exam: Fundamental Programming Structures in Java

Please write your name and username here legibly: C212/A592 6W2 Summer 2017 Early Evaluation Exam: Fundamental Programming Structures in Java Please write your name and username here legibly: C212/A592 6W2 Summer 2017 Early Evaluation Exam: Fundamental Programming Structures in Java Use BigDecimal (a class defined in package java.math) to write

More information

Pseudocode. ARITHMETIC OPERATORS: In pseudocode arithmetic operators are used to perform arithmetic operations. These operators are listed below:

Pseudocode. ARITHMETIC OPERATORS: In pseudocode arithmetic operators are used to perform arithmetic operations. These operators are listed below: Pseudocode There are 3 programming/pseudocode constructs: 1. Sequence: It refers that instructions should be executed one after another. 2. Selection: This construct is used to make a decision in choosing

More information

Rational and Irrational Numbers

Rational and Irrational Numbers LESSON. Rational and Irrational Numbers.NS. Know that numbers that are not rational are called irrational. Understand informally that every number has a decimal expansion;... lso.ns.2,.ee.2? ESSENTIL QUESTION

More information

CHRIST THE KING BOYS MATRIC HR. SEC. SCHOOL, KUMBAKONAM CHAPTER 9 C++

CHRIST THE KING BOYS MATRIC HR. SEC. SCHOOL, KUMBAKONAM CHAPTER 9 C++ CHAPTER 9 C++ 1. WRITE ABOUT THE BINARY OPERATORS USED IN C++? ARITHMETIC OPERATORS: Arithmetic operators perform simple arithmetic operations like addition, subtraction, multiplication, division etc.,

More information

INFORMATION TECHNOLOGY SPREADSHEETS. Part 1

INFORMATION TECHNOLOGY SPREADSHEETS. Part 1 INFORMATION TECHNOLOGY SPREADSHEETS Part 1 Page: 1 Created by John Martin Exercise Built-In Lists 1. Start Excel Spreadsheet 2. In cell B1 enter Mon 3. In cell C1 enter Tue 4. Select cell C1 5. At the

More information

Big Apple Academy 2017 Mathematics Department

Big Apple Academy 2017 Mathematics Department Big Apple Academy 201 Mathematics Department Grade Homework Math Package It is important that you keep practicing your mathematical Knowledge over the summer to be ready for 5 th grade. In this Package

More information

ECOR Come to the PASS workshop with your mock exam complete. During the workshop you can work with other students to review your work.

ECOR Come to the PASS workshop with your mock exam complete. During the workshop you can work with other students to review your work. It is most beneficial to you to write this mock midterm UNDER EXAM CONDITIONS. This means: Complete the midterm in 1.5 hour(s). Work on your own. Keep your notes and textbook closed. Attempt every question.

More information

Montana City School GRADE 5

Montana City School GRADE 5 Montana City School GRADE 5 Montana Standard 1: Students engage in the mathematical processes of problem solving and reasoning, estimation, communication, connections and applications, and using appropriate

More information

Slide 1 CS 170 Java Programming 1 Expressions Duration: 00:00:41 Advance mode: Auto

Slide 1 CS 170 Java Programming 1 Expressions Duration: 00:00:41 Advance mode: Auto CS 170 Java Programming 1 Expressions Slide 1 CS 170 Java Programming 1 Expressions Duration: 00:00:41 What is an expression? Expression Vocabulary Any combination of operators and operands which, when

More information

Use Math to Solve Problems and Communicate. Level 1 Level 2 Level 3 Level 4 Level 5 Level 6

Use Math to Solve Problems and Communicate. Level 1 Level 2 Level 3 Level 4 Level 5 Level 6 Number Sense M.1.1 Connect and count number words and numerals from 0-999 to the quantities they represent. M.2.1 Connect and count number words and numerals from 0-1,000,000 to the quantities they represent.

More information

Chapter 1: Number and Operations

Chapter 1: Number and Operations Chapter 1: Number and Operations 1.1 Order of operations When simplifying algebraic expressions we use the following order: 1. Perform operations within a parenthesis. 2. Evaluate exponents. 3. Multiply

More information

Information Science 1

Information Science 1 Topics covered Information Science 1 Terms and concepts from Week 8 Simple calculations Documenting programs Simple Calcula,ons Expressions Arithmetic operators and arithmetic operator precedence Mixed-type

More information

CS111: PROGRAMMING LANGUAGE1. Lecture 2: Algorithmic Problem Solving

CS111: PROGRAMMING LANGUAGE1. Lecture 2: Algorithmic Problem Solving CS111: PROGRAMMING LANGUAGE1 Lecture 2: Algorithmic Problem Solving Agenda 2 Problem Solving Techniques Pseudocode Algorithm Flow charts Examples How People Solve Problems 3 A Problem exists when what

More information

CSE115 / CSE503 Introduction to Computer Science I Dr. Carl Alphonce 343 Davis Hall Office hours:

CSE115 / CSE503 Introduction to Computer Science I Dr. Carl Alphonce 343 Davis Hall Office hours: CSE115 / CSE503 Introduction to Computer Science I Dr. Carl Alphonce 343 Davis Hall alphonce@buffalo.edu Office hours: Tuesday 10:00 AM 12:00 PM * Wednesday 4:00 PM 5:00 PM Friday 11:00 AM 12:00 PM OR

More information

CSC-140 Assignment 6

CSC-140 Assignment 6 CSC-140 Assignment 6 1 Introduction In this assignment we will start out defining our own classes. For now, we will design a class that represents a date, e.g., Tuesday, March 15, 2011, or in short hand

More information

Section 1.1 Definitions and Properties

Section 1.1 Definitions and Properties Section 1.1 Definitions and Properties Objectives In this section, you will learn to: To successfully complete this section, you need to understand: Abbreviate repeated addition using Exponents and Square

More information

10/9/2012. Comparison and Logical Operators The if Statement The if else Statement Nested if Statements The switch case. switch case Statement

10/9/2012. Comparison and Logical Operators The if Statement The if else Statement Nested if Statements The switch case. switch case Statement 1. 2. 3. 4. I l Implementing ti Control C t ll Logic i iin C# 5 5. Comparison and Logical Operators The if Statement The if Statement Nested if Statements The switch case switch case Statement 2 Operator

More information

Objectives/Outcomes. Introduction: If we have a set "collection" of fruits : Banana, Apple and Grapes.

Objectives/Outcomes. Introduction: If we have a set collection of fruits : Banana, Apple and Grapes. 1 September 26 September One: Sets Introduction to Sets Define a set Introduction: If we have a set "collection" of fruits : Banana, Apple Grapes. 4 F={,, } Banana is member "an element" of the set F.

More information

I Can Grade 4 Math. Example. AACPS Division of Curriculum & Instruction Model Content Frameworks, PARCC December I need help from my teacher.

I Can Grade 4 Math. Example. AACPS Division of Curriculum & Instruction Model Content Frameworks, PARCC December I need help from my teacher. I Can Grade 4 Math Major Content Supporting Content Additional Content I Can Example I don t yet know it. I need help from my teacher. I sometimes need help. I can do this all by myself. I can teach this.

More information

Algebra II Quadratic Functions

Algebra II Quadratic Functions 1 Algebra II Quadratic Functions 2014-10-14 www.njctl.org 2 Ta b le o f C o n te n t Key Terms click on the topic to go to that section Explain Characteristics of Quadratic Functions Combining Transformations

More information

Chapter Fourteen Bonus Lessons: Algorithms and Efficiency

Chapter Fourteen Bonus Lessons: Algorithms and Efficiency : Algorithms and Efficiency The following lessons take a deeper look at Chapter 14 topics regarding algorithms, efficiency, and Big O measurements. They can be completed by AP students after Chapter 14.

More information

Grade 8 Common Mathematics Assessment Multiple Choice Answer Sheet Name: Mathematics Teacher: Homeroom: Section A No Calculator Permitted

Grade 8 Common Mathematics Assessment Multiple Choice Answer Sheet Name: Mathematics Teacher: Homeroom: Section A No Calculator Permitted Multiple Choice Answer Sheet Name: Mathematics Teacher: Homeroom: Section A No Calculator Permitted Calculator Permitted. A B C D 2. A B C D. A B C D 4. A B C D 5. A B C D 6. A B C D 7. A B C D 8. A B

More information

Information Science 1

Information Science 1 Information Science 1 Simple Calcula,ons Week 09 College of Information Science and Engineering Ritsumeikan University Topics covered l Terms and concepts from Week 8 l Simple calculations Documenting

More information

Watkins Mill High School. Algebra 2. Math Challenge

Watkins Mill High School. Algebra 2. Math Challenge Watkins Mill High School Algebra 2 Math Challenge "This packet will help you prepare for Algebra 2 next fall. It will be collected the first week of school. It will count as a grade in the first marking

More information

Day 1: Introduction to MATLAB and Colorizing Images CURIE Academy 2015: Computational Photography Sign-Off Sheet

Day 1: Introduction to MATLAB and Colorizing Images CURIE Academy 2015: Computational Photography Sign-Off Sheet Day 1: Introduction to MATLAB and Colorizing Images CURIE Academy 2015: Computational Photography Sign-Off Sheet NAME: NAME: Part 1.1 Part 1.2 Part 1.3 Part 2.1 Part 2.2 Part 3.1 Part 3.2 Sign-Off Milestone

More information

Chapter 2. Designing a Program. Input, Processing, and Output Fall 2016, CSUS. Chapter 2.1

Chapter 2. Designing a Program. Input, Processing, and Output Fall 2016, CSUS. Chapter 2.1 Chapter 2 Input, Processing, and Output Fall 2016, CSUS Designing a Program Chapter 2.1 1 Algorithms They are the logic on how to do something how to compute the value of Pi how to delete a file how to

More information

Matrices. A Matrix (This one has 2 Rows and 3 Columns) To add two matrices: add the numbers in the matching positions:

Matrices. A Matrix (This one has 2 Rows and 3 Columns) To add two matrices: add the numbers in the matching positions: Matrices A Matrix is an array of numbers: We talk about one matrix, or several matrices. There are many things we can do with them... Adding A Matrix (This one has 2 Rows and 3 Columns) To add two matrices:

More information

Python Numbers. Learning Outcomes 9/19/2012. CMSC 201 Fall 2012 Instructor: John Park Lecture Section 01 Discussion Sections 02-08, 16, 17

Python Numbers. Learning Outcomes 9/19/2012. CMSC 201 Fall 2012 Instructor: John Park Lecture Section 01 Discussion Sections 02-08, 16, 17 Python Numbers CMSC 201 Fall 2012 Instructor: John Park Lecture Section 01 Discussion Sections 02-08, 16, 17 1 (adapted from Meeden, Evans & Mayberry) 2 Learning Outcomes To become familiar with the basic

More information

Coached Instruction Supplement

Coached Instruction Supplement Practice Coach PLUS Coached Instruction Supplement Mathematics 5 Practice Coach PLUS, Coached Instruction Supplement, Mathematics, Grade 5 676NASP Triumph Learning Triumph Learning, LLC. All rights reserved.

More information

3x - 5 = 22 4x - 12 = 2x - 9

3x - 5 = 22 4x - 12 = 2x - 9 3. Algebra Solving Equations ax + b = cx + d Algebra is like one big number guessing game. I m thinking of a number. If you multiply it by 2 and add 5, you get 21. 2x + 5 = 21 For a long time in Algebra

More information

The x coordinate tells you how far left or right from center the point is. The y coordinate tells you how far up or down from center the point is.

The x coordinate tells you how far left or right from center the point is. The y coordinate tells you how far up or down from center the point is. We will review the Cartesian plane and some familiar formulas. College algebra Graphs 1: The Rectangular Coordinate System, Graphs of Equations, Distance and Midpoint Formulas, Equations of Circles Section

More information

CISC 181 Lab 2 (100 pts) Due: March 7 at midnight (This is a two-week lab)

CISC 181 Lab 2 (100 pts) Due: March 7 at midnight (This is a two-week lab) CISC 181 Lab 2 (100 pts) Due: March 7 at midnight (This is a two-week lab) This lab may be done individually or with a partner. Working with a partner DOES NOT mean, you do the evens, and I ll do the odds.

More information

} Evaluate the following expressions: 1. int x = 5 / 2 + 2; 2. int x = / 2; 3. int x = 5 / ; 4. double x = 5 / 2.

} Evaluate the following expressions: 1. int x = 5 / 2 + 2; 2. int x = / 2; 3. int x = 5 / ; 4. double x = 5 / 2. Class #10: Understanding Primitives and Assignments Software Design I (CS 120): M. Allen, 19 Sep. 18 Java Arithmetic } Evaluate the following expressions: 1. int x = 5 / 2 + 2; 2. int x = 2 + 5 / 2; 3.

More information

Math 7 Notes Unit Three: Applying Rational Numbers

Math 7 Notes Unit Three: Applying Rational Numbers Math 7 Notes Unit Three: Applying Rational Numbers Strategy note to teachers: Typically students need more practice doing computations with fractions. You may want to consider teaching the sections on

More information

English 4 th Grade M-Z Vocabulary Cards and Word Walls Revised: June 3, 2013

English 4 th Grade M-Z Vocabulary Cards and Word Walls Revised: June 3, 2013 English 4 th Grade M-Z Vocabulary Cards and Word Walls Revised: June 3, 2013 Important Notes for Teachers: The vocabulary cards in this file match the Common Core, the math curriculum adopted by the Utah

More information

Understanding the problem

Understanding the problem 2.1.1 Problem solving and design An algorithm is a plan, a logical step-by-step process for solving a problem. Algorithms are normally written as a flowchart or in pseudocode. The key to any problem-solving

More information

Using Microsoft Word. Tables

Using Microsoft Word. Tables Using Microsoft Word are a useful way of arranging information on a page. In their simplest form, tables can be used to place information in lists. More complex tables can be used to arrange graphics on

More information

Boolean Data-Type. Boolean Data Type (false, true) i.e. 3/6/2018. The type bool is also described as being an integer: bool bflag; bflag = true;

Boolean Data-Type. Boolean Data Type (false, true) i.e. 3/6/2018. The type bool is also described as being an integer: bool bflag; bflag = true; Programming in C++ If Statements If the sun is shining Choice Statements if (the sun is shining) go to the beach; True Beach False Class go to class; End If 2 1 Boolean Data Type (false, ) i.e. bool bflag;

More information

PDS Lab Section 16 Autumn Tutorial 3. C Programming Constructs

PDS Lab Section 16 Autumn Tutorial 3. C Programming Constructs PDS Lab Section 16 Autumn-2017 Tutorial 3 C Programming Constructs This flowchart shows how to find the roots of a Quadratic equation Ax 2 +Bx+C = 0 Start Input A,B,C x B 2 4AC False x If 0 True B x 2A

More information

Maths Programme of Study 3.3

Maths Programme of Study 3.3 1 4/9/17 2 11/9/17 3 18/9/17 4 25/9/17 5 2/10/17 Recognise place value of each digit in 4-digit numbers. Identify, estimate and represent numbers using different representations including measures. Compare

More information

Number System. Introduction. Natural Numbers (N) Whole Numbers (W) Integers (Z) Prime Numbers (P) Face Value. Place Value

Number System. Introduction. Natural Numbers (N) Whole Numbers (W) Integers (Z) Prime Numbers (P) Face Value. Place Value 1 Number System Introduction In this chapter, we will study about the number system and number line. We will also learn about the four fundamental operations on whole numbers and their properties. Natural

More information

Year 6 Maths Scheme of Work

Year 6 Maths Scheme of Work Year 6 National Curriculum The 2014 2015 Year 6 cohort will be using the old national curriculum as this is what will be used for the KS2 SATs 2015. Below are the objectives students are required to meet

More information

Week 3: Objects, Input and Processing

Week 3: Objects, Input and Processing CS 170 Java Programming 1 Week 3: Objects, Input and Processing Learning to Create Objects Learning to Accept Input Learning to Process Data What s the Plan? Topic I: Working with Java Objects Learning

More information

PRE-ALGEBRA BY MYRL SHIREMAN

PRE-ALGEBRA BY MYRL SHIREMAN PRE-ALGEBRA BY MYRL SHIREMAN COPYRIGHT 1994 Mark Twain Media, Inc. ISBN 10-digit: 1-58037-064-0 13-digit: 978-1-58037-064-6 Printing No. CD-1876 Mark Twain Media, Inc., Publishers Distributed by Carson-Dellosa

More information

1.- DECIMAL PLACE VALUE: tenths, hundredths, thousandths. 1.1 Ordering decimals. 1.2 Rounding CALCULATIONS. 2.- ADDITION AND SUBTRACTION OF DECIMALS

1.- DECIMAL PLACE VALUE: tenths, hundredths, thousandths. 1.1 Ordering decimals. 1.2 Rounding CALCULATIONS. 2.- ADDITION AND SUBTRACTION OF DECIMALS 1 1.- DECIMAL PLACE VALUE: tenths, hundredths, thousandths. 1.1 Ordering decimals. 1.2 Rounding CALCULATIONS. 2.- ADDITION AND SUBTRACTION OF DECIMALS 3.- MULTIPLICATION AND DIVISION. 3.1 Multiplication

More information

ALGEBRA 1 NOTES. Quarter 3. Name: Block

ALGEBRA 1 NOTES. Quarter 3. Name: Block 2016-2017 ALGEBRA 1 NOTES Quarter 3 Name: Block Table of Contents Unit 8 Exponent Rules Exponent Rules for Multiplication page 4 Negative and Zero Exponents page 8 Exponent Rules Involving Quotients page

More information

Com S 127 Lab 2. For the first two parts of the lab, start up Wing 101 and use the Python shell window to try everything out.

Com S 127 Lab 2. For the first two parts of the lab, start up Wing 101 and use the Python shell window to try everything out. Com S 127 Lab 2 Checkpoint 0 Please open the CS 127 Blackboard page and click on Groups in the menu at left. Sign up for the group corresponding to the lab section you are attending. Also, if you haven't

More information

CSC 120 Introduction to Creative Graphical Coding, Fall 2015

CSC 120 Introduction to Creative Graphical Coding, Fall 2015 CSC 120 Introduction to Creative Graphical Coding, Fall 2015 Dr. Dale E. Parson, Assignment 1, Implementing and testing an automated avatar in Processing. This assignment is due via D2L Dropbox Assignment

More information

EECS1012. Net-centric Introduction to Computing. Lecture 7 Computational Thinking. Fall 2018, EECS York University. M.S. Brown and Amir H.

EECS1012. Net-centric Introduction to Computing. Lecture 7 Computational Thinking. Fall 2018, EECS York University. M.S. Brown and Amir H. EECS1012 Net-centric Introduction to Computing Lecture 7 Computational hinking all 2018, EECS York University M.S. Brown and Amir H. Chinaei overview computational thinking the thought process involved

More information

New York University Introduction to Computer Science Midterm2 Sample Problems 2013 Andrew I. Case. Instructions:

New York University Introduction to Computer Science Midterm2 Sample Problems 2013 Andrew I. Case. Instructions: Name: New York University Introduction to Computer Science Midterm2 Sample Problems 2013 Andrew I. Case Instructions: KEEP TEST BOOKLET CLOSED UNTIL YOU ARE INSTRUCTED TO BEGIN. This exam is double sided

More information

boolean & if-then-else

boolean & if-then-else boolean & if-then-else Lecture 03 Step 1: Open VSCode and its Integrated Terminal Step 2: npm run pull Step 3: npm run start Step 4: Open another tab to pollev.com/comp110 Assignments Out Problem Set 0

More information

More Formulas: circles Elementary Education 12

More Formulas: circles Elementary Education 12 More Formulas: circles Elementary Education 12 As the title indicates, this week we are interested in circles. Before we begin, please take some time to define a circle: Due to the geometric shape of circles,

More information

Chapter Binary Representation of Numbers

Chapter Binary Representation of Numbers Chapter 4 Binary Representation of Numbers After reading this chapter, you should be able to: convert a base- real number to its binary representation,. convert a binary number to an equivalent base- number.

More information

WHAT ARE THE PARTS OF A QUADRATIC?

WHAT ARE THE PARTS OF A QUADRATIC? 4.1 Introduction to Quadratics and their Graphs Standard Form of a Quadratic: y ax bx c or f x ax bx c. ex. y x. Every function/graph in the Quadratic family originates from the parent function: While

More information

CS 221 Lecture. Tuesday, 4 October There are 10 kinds of people in this world: those who know how to count in binary, and those who don t.

CS 221 Lecture. Tuesday, 4 October There are 10 kinds of people in this world: those who know how to count in binary, and those who don t. CS 221 Lecture Tuesday, 4 October 2011 There are 10 kinds of people in this world: those who know how to count in binary, and those who don t. Today s Agenda 1. Announcements 2. You Can Define New Functions

More information

Anadarko Public Schools MATH Power Standards

Anadarko Public Schools MATH Power Standards Anadarko Public Schools MATH Power Standards Kindergarten 1. Say the number name sequence forward and backward beginning from a given number within the known sequence (counting on, spiral) 2. Write numbers

More information

June To the Students Taking Algebra at Baines for the School Year:

June To the Students Taking Algebra at Baines for the School Year: June 011 To the Students Taking Algebra at Baines for the 011-01 School Year: Next year will be an exciting and challenging year as you take high school credit Algebra I Pre-AP. We spend very little time

More information

Control Statements. if for while

Control Statements. if for while Control Structures Control Statements if for while Control Statements if for while This This is is called called the the initialization initialization statement statement and and is is performed performed

More information

Loops (while and for)

Loops (while and for) Loops (while and for) CSE 1310 Introduction to Computers and Programming Alexandra Stefan 1 Motivation Was there any program we did (class or hw) where you wanted to repeat an action? 2 Motivation Name

More information

In Maths, each class is allocated to a grade. The work for each grade for this half term is outlined on the following slides.

In Maths, each class is allocated to a grade. The work for each grade for this half term is outlined on the following slides. In Maths, each class is allocated to a grade. The work for each grade for this half term is outlined on the following slides. You need to know which grade you are learning about to know which section to

More information

Shell Script Programs with If Then Else Statements

Shell Script Programs with If Then Else Statements Shell Script Programs with If Then Else Statements June 3, 2010 Copyright 2010 by World Class CAD, LLC. All Rights Reserved. Adding Comments When we want to place a comment in a Shell Script, we type the

More information

The School District of Palm Beach County Fourth Grade Mathematics Scope st Trimester

The School District of Palm Beach County Fourth Grade Mathematics Scope st Trimester Number and Operations in Base Ten Generalize place value understanding for multi-digit whole numbers. NBT.1.1 NBT.1.2 NBT.1.3 Recognize that in a multi-digit whole number, a digit in one place represents

More information

Chapter 5: Computer Arithmetic. In this chapter you will learn about:

Chapter 5: Computer Arithmetic. In this chapter you will learn about: Slide 1/29 Learning Objectives In this chapter you will learn about: Reasons for using binary instead of decimal numbers Basic arithmetic operations using binary numbers Addition (+) Subtraction (-) Multiplication

More information

The inverse of a matrix

The inverse of a matrix The inverse of a matrix A matrix that has an inverse is called invertible. A matrix that does not have an inverse is called singular. Most matrices don't have an inverse. The only kind of matrix that has

More information

Intro to Programming. Unit 7. What is Programming? What is Programming? Intro to Programming

Intro to Programming. Unit 7. What is Programming? What is Programming? Intro to Programming Intro to Programming Unit 7 Intro to Programming 1 What is Programming? 1. Programming Languages 2. Markup vs. Programming 1. Introduction 2. Print Statement 3. Strings 4. Types and Values 5. Math Externals

More information