Week 3 Lab1 Review Dina A. Said

Slides:



Advertisements
Similar presentations
You have been given a mission and a code. Use the code to complete the mission and you will save the world from obliteration…
Advertisements

Opening Objective By the end of this PowerPoint you should be able to:
Warm-up Solve each equation. 1. k2 = b2 = m2 – 196 = c = 36
Bellwork If you roll a die, what is the probability that you roll a 2 or an odd number? P(2 or odd) 2. Is this an example of mutually exclusive, overlapping,
Copyright © 2002 Pearson Education, Inc. 1. Chapter 2 An Introduction to Functions.
1 Copyright © 2010, Elsevier Inc. All rights Reserved Fig 2.1 Chapter 2.
Chapters 1 & 2 Theorem & Postulate Review Answers
Business Transaction Management Software for Application Coordination 1 Business Processes and Coordination.
Dividing Monomials.
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Title Subtitle.
My Alphabet Book abcdefghijklm nopqrstuvwxyz.
0 - 0.
2 pt 3 pt 4 pt 5 pt 1 pt 2 pt 3 pt 4 pt 5 pt 1 pt 2 pt 3 pt 4 pt 5 pt 1 pt 2 pt 3 pt 4 pt 5 pt 1 pt 2 pt 3 pt 4 pt 5 pt 1 pt ShapesPatterns Counting Number.
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
MULTIPLYING MONOMIALS TIMES POLYNOMIALS (DISTRIBUTIVE PROPERTY)
ADDING INTEGERS 1. POS. + POS. = POS. 2. NEG. + NEG. = NEG. 3. POS. + NEG. OR NEG. + POS. SUBTRACT TAKE SIGN OF BIGGER ABSOLUTE VALUE.
SUBTRACTING INTEGERS 1. CHANGE THE SUBTRACTION SIGN TO ADDITION
MULT. INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
Addition Facts
Year 6 mental test 5 second questions
School Shop. Welcome to my shop. You have 10p How much change will you get? 7p 3p change.
ZMQS ZMQS
Factoring Trinomials When a=1 ALWAYS check for GCF first! Factor trinomials in the standard form ax²+ bx + c Solve equations in the standard form ax²+
Copyright 2012, 2008, 2004, 2000 Pearson Education, Inc.
1) Read 2) Plan 3) Solve 4) Check Camels live in many places around the world. There are two kinds of camels. The Bactrian camel has two humps, while.
BT Wholesale October Creating your own telephone network WHOLESALE CALLS LINE ASSOCIATED.
Treasure Map By: Gage Gwin Haven Beagle START. Step 1 23 tiles south CONTINUE.
Solve two-step equations.
Real Zeros of Polynomial Functions Real Zeros of Polynomial Functions
ABC Technology Project
O X Click on Number next to person for a question.
© S Haughton more than 3?
5.9 + = 10 a)3.6 b)4.1 c)5.3 Question 1: Good Answer!! Well Done!! = 10 Question 1:
Polynomial Factor Theorem Polynomial Factor Theorem
1 Directed Depth First Search Adjacency Lists A: F G B: A H C: A D D: C F E: C D G F: E: G: : H: B: I: H: F A B C G D E H I.
Multiply/Divide integers Absent 10/14
Interesting Integers!.
Twenty Questions Subject: Twenty Questions
Squares and Square Root WALK. Solve each problem REVIEW:
Created by Susan Neal $100 Fractions Addition Fractions Subtraction Fractions Multiplication Fractions Division General $200 $300 $400 $500 $100 $200.
4 If-Statements © 2010 David A Watt, University of Glasgow Accelerated Programming 2 Part I: Python Programming.
Do you have the Maths Factor?. Maths Can you beat this term’s Maths Challenge?
Week 1 Lab2 Dina A. Said What to be covered today? Wiki Custom calculations If statement Pivot tables Lookup table 1/21/2009CPSC203-
David Walker Ottawa TMG Users Group 15 March 2014.
Absolute-Value Equations and Inequalities
Past Tense Probe. Past Tense Probe Past Tense Probe – Practice 1.
Limits (Algebraic) Calculus Fall, What can we do with limits?
Properties of Exponents
GG Consulting, LLC I-SUITE. Source: TEA SHARS Frequently asked questions 2.
1 First EMRAS II Technical Meeting IAEA Headquarters, Vienna, 19–23 January 2009.
Event 4: Mental Math 7th/8th grade Math Meet ‘11.
Be Ready for Every Good Work A Study of Titus 3:1-7 All Scriptures quoted are from the English Standard Version.
Addition 1’s to 20.
25 seconds left…...
Test B, 100 Subtraction Facts
U1A L1 Examples FACTORING REVIEW EXAMPLES.
11 = This is the fact family. You say: 8+3=11 and 3+8=11
Week 1.
Lilian Blot CORE ELEMENTS SELECTION & FUNCTIONS Lecture 3 Autumn 2014 TPOP 1.
We will resume in: 25 Minutes.
Solving Addition and Subtraction Inequalities
O X Click on Number next to person for a question.
a*(variable)2 + b*(variable) + c
Equivalence Relations
L6:CSC © Dr. Basheer M. Nasef Lecture #6 By Dr. Basheer M. Nasef.
Week 2 Lab2 Practice Dina A. Said
The If Statement There are no switch statements in Python. You need to use just if statements. There are no switch statements in Python. You need to use.
Presentation transcript:

Week 3 Lab1 Review Dina A. Said

Mathematical operations  Suppose that x= 7, y =2  Z= x + y =9  Z= x-y = 5  Z= x*y = 14  Z= x / y = 3 (because both of them are integers)  Z= 7.0 / 2.0 = 7 / 2.0 = 7.0 / 2 = 3.5  Z= x % y = 1 (the reminder of the division) 3/23/2009CPSC203- Wee3 Lab1

Mod operation  The result in the reminder of the division  10%2= 0  11%2 =1  15 % 3 =0  17 % 3 = 2  16 % 3 = 1  To know if y is divisible by x, check if y % x =0  X is even if x % 2=0  X is odd if x% 2 =1 3/23/2009CPSC203- Wee3 Lab1

Notes  x =2  z=1  z = z+ x = 3  z+= x = 3  z=z+x is the same as z+=x 3/23/2009CPSC203- Wee3 Lab1

Parameters passing  def myFunc(name, ID):  Print name, Id  When u execute myFunc in the black window:  myFunc(“John”, 26378)  def printList(myList):  for i in myList: print i  When you execute printList in the black window:  printList([1,2,3])  printList([7]) 3/23/2009CPSC203- Wee3 Lab1

Note  To know the length of a list, use command len(myList)  def printList(myList):  Print “You passed”, len(myList), “ parameters”  for i in myList: print i 3/23/2009CPSC203- Wee3 Lab1

If-else condition if test1: statements1 elif test2: statements2 else: statements3 IMP:  Don’t forget : after the condition  For equal test, you must use “== “e.g. if x==y  There is no condition after else 3/11/2009CPSC203- Week2- Lab27

Example  Write a function that accepts a number x as a parameter and checks if this number if positive, negative, or zero Think before looking to answer 3/23/2009CPSC203- Wee3 Lab1

3/23/2009CPSC203- Wee3 Lab1 def check(x): if (x>0): print "Positive" elif (x<0): print "Negative" else: print "Zero"

For loop for target in object: statements Example: modify the previous program to accept a list of numbers. Do a for loop to check whether each number in the list is positive, negative, or zero Test your program with check([-4,7,0,-1,9]) 3/23/2009CPSC203- Wee3 Lab1

3/23/2009CPSC203- Wee3 Lab1 def check(list): for x in list: if (x>0): print "Positive" elif (x<0): print "Negative" else: print "Zero"

Example  Modify the previous program to count the number of even numbers in the list 3/23/2009CPSC203- Wee3 Lab1

3/23/2009CPSC203- Wee3 Lab1 def check(list): count=0 for x in list: if (x>0): count=count+1 print "No. of positive numbers is ", count