Dr. Joe Anderson September 6, 2017

Slides:



Advertisements
Similar presentations
Prime Factorization Section 2.5. Objectives Find the prime factorization of a counting number by repeated division Find the prime factorization of a counting.
Advertisements

Chapter 4 Number Theory.
Copyright © 2005 Pearson Education, Inc. 5.3 The Rational Numbers.
Objective: Learn to multiply and divide integers.
Divisibility Rules and Mental Math
I can use multiplication or division to solve inequalities.
Integer Rules. Adding with the same sign Rules Rules Add like normal Add like normal Keep the sign Keep the sign Examples Examples = -22 (all.
Rational Numbers and Decimals
1.3B MULTIPLYING AND DIVIDING INTEGERS I can multiply and divide integers to solve problems involving integers.
Rational Numbers.
Add , Subtract, Multiply, Divide.
I am a two-digit number I am between 10 and 20 I am a multiple of 3
Synthetic Division. This method is used to divide polynomials, one of which is a binomial of degree one.
Integer Conversion Between Decimal and Binary Bases Conversion of decimal to binary more complicated Task accomplished by –Repeated division of decimal.
Fraction and Mixed Number Review (Add & Subtract).
When dividing a decimal by a whole number, place the decimal point in the quotient directly above the decimal point in the dividend. Then divide as you.
Operators in Python. Arithmetic operators Some operators in Python will look familiar (+, -, *, /) Others are new to you (%, //, **) All of these do work.
Ch 11.5 Dividing Polynomials
3.2 Dividing Polynomials 11/28/2012. Review: Quotient of Powers Ex. In general:
Objective 3 Multiplying and Dividing Integers © 2000 by R. Villar All Rights Reserved.
Multiply and Divide Integers
Divisibility Test For Different Numbers
Write Equivalent Fractions
6.3 Dividing Polynomials 1. When dividing by a monomial: Divide each term by the denominator separately 2.
Laws of Exponents. Vocabulary Factor:an integer that divides into another integer with no remainder. Factor:an integer that divides into another integer.
1.8 DIVIDING RATIONAL NUMBERS I CAN USE THE RULES FOR DIVIDING INTEGERS TO DIVIDE RATIONAL NUMBERS AND SOLVE PROBLEMS BY DIVIDING RATIONAL NUMBERS.
Partial Quotient Method In this division algorithm the children record on the right side of the problem. The first thing they do is divide. They ask themselves.
7.4 The Remainder and Factor Theorems Use Synthetic Substitution to find Remainders.
Dividing Decimals that Terminate Section (3 – 4).
Dividing Decimals Lesson 1-9. Remember the parts of a division problem: dividend divisor quotient.
Aim: How can we use synthetic division to divide polynomials?
Goal: use division to generate mixed numbers and improper fractions.
Warm-up/Review Multiply the following decimals: x x x x 09.
3x + 2 6x3 - 5x2 – 12x – 4 2x2 – 3x – 2 6x3 + 4x2 -9x2 – 12x -9x2 – 6x
Assignment 15: 11.5 WB Pg. 153 #2 – 20 even
Rational Numbers and Decimals
while Repetition Structure
Warm-up (on page ) Divide.
7.4 The Remainder and Factor Theorems
Dividing Polynomials Tyler McKell.
CSE 102 Introduction to Computer Engineering
Multiplication of Real Numbers
Prime Numbers.
Multiplication: Groups
Arithmetic Operators Topics Arithmetic Operators Operator Precedence
Arithmetic Operators Topics Arithmetic Operators Operator Precedence
Operations with Integers
Dividing Decimals.
Dividing Decimals.
G7 programing language Teacher / Shamsa Hassan Alhassouni.
More Maths Programming Guides.
Chapter 2: Number Systems
Algebra II September 2, 2011.
Conditionals.
Tests of Divisibility 1 - All integers can be divided by 1
Multiplying and dividing Integers
Add, Subtract, Divide and Multiply Integers
Multiplying Integers SAME SIGNS??? Answer will be POSITIVE. ex)
Dividing Polynomials WOW! I want to learn how to do that?
Operations Python code.
Decimal / Binary Conversions
Arithmetic Operators Topics Arithmetic Operators Operator Precedence
Division- the bus stop method
Warm up.
Operations with Integers
Algebra 1 Section 9.6.
Types of loops definite loop: A loop that executes a known number of times. Examples: Repeat these statements 10 times. Repeat these statements k times.
Multiplication and Division of Integers
Dividing Decimals #4.
Presentation transcript:

Dr. Joe Anderson September 6, 2017 COSC 117 Lab 2 Dr. Joe Anderson September 6, 2017

Modulus operator Modulus operator: “%” Performs division of two numbers and returns only the remainder Ex: 11 % 5 == 1 10 % 5 == 0 23 % 3 == 2 Common usage: to test if a number is even or odd! If n is even, then n % 2 == 0 If n is odd, then n % 2 == 1

Lab: 3N + 1 Problem Given: a positive integer ”n” If n is even, divide it by 2 If n is odd, multiply it by 3 and add 1 Stop when n is 1, otherwise, repeat Ex: Start with 3 3 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2 -> 1 Your tasks: Ask user for a positive int Perform 3N + 1 operation, until it reaches 1, and print each step to the terminal