AE1205 Programming Python Quiz: so how do we generate Numbers 1 to 10? range( ) Numbers 5,10,15,20,25 to 100? range( ) Numbers 20,18,16, to 0? range( )

Slides:



Advertisements
Similar presentations
Continuation of chapter 6…. Nested while loop A while loop used within another while loop is called nested while loop. Q. An illustration to generate.
Advertisements

Week 5 - Friday.  What did we talk about last time?  Repetition  while loops.
Last Week Doctests Lists List methods Nested Lists Aliasing.
COMPE 111 Introduction to Computer Engineering Programming in Python Atılım University
A revision guide for programming with python. 1.A program is a set of instructions that tells a computer what to do. 2.The role of a programmer is to.
Do Now Find the GCF of each set of numbers. 1)34, 51 2)36, 72 3)21, 42, 56.
Parabola Quiz 10 Revision questions. Write the equation for this parabola #1.
Comparisons Hold up the ‘+’ card if you think the answer is always positive. Hold up the ‘-’ card if you think the answer is always negative. The ?? Card.
CLASS OPENER: Is the given sequence arithmetic, if so what is the common difference? 1.1,4,9,16… 2.-21, -18, -15, -12… 3.97, 86, 75, 64… 4.0, 1, 3, 6,
AE1205 Programming & Scientific Computing in Python for Aerospace Engineers Quiz What will this print? a = 2 b = 3 c = a/b print c 1 Answer: 0.
Do Now 1. Which of the following is not a rational number? 2 4 – 3 7 π – Evaluate the expression – 62 + ÷ 4 4. ( 5734 –– )2)2 ANSWER 12.
Инвестиционный паспорт Муниципального образования «Целинский район»
Objectives The student will be able to: Factor using the greatest common factor (GCF). SOL: A.2c Designed by Skip Tyler, Varina High School.
5x 4 – 405 = 5(x 4 – 81) = 5(x 2 + 9)(x 2 – 9) = 5(x 2 + 9)(x + 3)(x – 3) by D. Fisher.
(x – 8) (x + 8) = 0 x – 8 = 0 x + 8 = x = 8 x = (x + 5) (x + 2) = 0 x + 5 = 0 x + 2 = x = - 5 x = - 2.
Intro to Nested Looping Intro to Computer Science CS1510 Dr. Sarah Diesburg.
Intro to Nested Looping Intro to Computer Science CS1510 Dr. Sarah Diesburg.
1 Answer #1, Quiz #1 Lp:slt $t0,$s1,$s2 # $t0 = a
Multiplication Facts X 3 = 2. 8 x 4 = 3. 7 x 2 =
Warm-Up #2 Multiply these polynomials. 1) (x-5) 2 2) (8x-1) 2 3. (4x- 3y)(3x +4y) Homework: P5 (1,3,5,11,13,17,27,33,41, 45,49,55,59,63,71,73,77) Answers:
Sec. 9-2: Multiplying & Factoring. To multiply a MONOMIAL with a polynomial, simply distribute the monomial through to EACH term of the polynomial. i.e.
SOLUTION Divide a polynomial by a monomial EXAMPLE 1 Divide 4x 3 + 8x x by 2x. Method 1 : Write the division as a fraction. Write as fraction. Divide.
3x + 2 6x 3 - 5x 2 – 12x – 4 DMSBDMSB 2x 2 6x 3 + 4x 2 -9x 2 – 12x – 3x -9x 2 – 6x – 4 – 2 – 6x– 4 0 Check: (3x + 2)(2x 2 – 3x – 2) = 6x 3 – 9x 2 – 6x.
Review Algebra 1 Chapter
Prerequisite Skills VOCABULARY CHECK Copy and complete the statement. ANSWER –9, 9 1. The square roots of 81 are ? and ?. 2. In the expression 2 5, the.
Prerequisite Skills VOCABULARY CHECK Copy and complete the statement. ? Terms that have the same variable part are called 1. like terms ANSWER zero ANSWER.
Course Functions 3-4 Functions Course 3 Warm Up Warm Up Problem of the Day Problem of the Day Lesson Presentation Lesson Presentation.
Money Quiz!!!!. Write the question number and the answer in your maths book. How much money is shown? 1.
Money Quiz!!!!. Write the question number and the answer in your maths book. How much money is shown? 1.
EXAMPLE 1 Compare graph of y = with graph of y = a x 1 x 1 3x3x b. The graph of y = is a vertical shrink of the graph of. x y = 1 = y 1 x a. The graph.
Keywords: Range Trace table Testing List Index Activities: To create a trace table for a small piece of code using a set of data. Create a trace table.
Quiz Title Your name goes here. Question 1 Click here for answer Click here for answer Go to question 2 Go to question 2.
Warm Up 1) 2(w + 1) 2) 3x(x 2 – 4) 2w + 23x 3 – 12x 2h Simplify. 13p Find the GCF of each pair of monomials. 3) 4h 2 and 6h 4) 13p and 26p 5.
照片档案整理 一、照片档案的含义 二、照片档案的归档范围 三、 卷内照片的分类、组卷、排序与编号 四、填写照片档案说明 五、照片档案编目及封面、备考填写 六、数码照片整理方法 七、照片档案的保管与保护.
공무원연금관리공단 광주지부 공무원대부등 공적연금 연계제도 공무원연금관리공단 광주지부. 공적연금 연계제도 국민연금과 직역연금 ( 공무원 / 사학 / 군인 / 별정우체국 ) 간의 연계가 이루어지지 않고 있 어 공적연금의 사각지대가 발생해 노후생활안정 달성 미흡 연계제도 시행전.
Жюль Верн ( ). Я мальчиком мечтал, читая Жюля Верна, Что тени вымысла плоть обретут для нас; Что поплывет судно громадней «Грейт Истерна»; Что.
מאת: יעקב דדוש. פיסול –בין יחיד לרבים יחידה 1 לתלמיד המתבונן לפניך שתי יצירות פיסוליות. התבונן וכתוב (בשקופית הבאה) מהם ההבדלים בין הפסלים המוצגים לפניך?
Factor the expression x – 5x2 3. x3 – 125 ANSWER 5x (2 – x)
Start the Quiz Show the answer Check the answer Time’s up! Timer
Objectives The student will be able to:
8.2A Factoring using Distributive Property
F i v e o r m s o f a c t o r i n g For Forms 1 - 3, do the examples on your paper then use the PowerPoint to check your answers Do not do Form 4.
8.6 Choosing a Factoring Method
Factor. x2 – 10x x2 – 16x + 1 Multiply. 3. (4x- 3y)(3x +4y)
Make Your Own Quiz.
Intro to Nested Looping
סדר דין פלילי – חקיקה ומהות ההליך הפלילי
Intro to Nested Looping
Lists in Python Outputting lists.
L.O. place the learning objective here

Intro to Nested Looping
Warm Up: Solve the Equation 4x2 + 8x – 32 = 0.
Objectives The student will be able to:
Objectives The student will be able to:
Bell Ringer 10/27/10 What is the GCF? 18x³y² and 24x² ab and a³b².
Money Quiz!!!!.
Review: 6.4e Mini-Quiz 1. Factor 5x2 – Factor x4 – 25x2
Jeopardy - Factoring Review of Factoring.
Objectives The student will be able to:
Print the following triangle, using nested loops
Objective Factor polynomials by using the greatest common factor.
Quiz – Lives of Stars.
You must show all steps of your working out.
Question 1.
Factoring using the greatest common factor (GCF).
Objectives The student will be able to:
Objectives The student will be able to:
Objectives The student will be able to:
Python Classes In Pune.
Presentation transcript:

AE1205 Programming Python Quiz: so how do we generate Numbers 1 to 10? range( ) Numbers 5,10,15,20,25 to 100? range( ) Numbers 20,18,16, to 0? range( ) 1

AE1205 Programming Python Quiz: so how do we generate Numbers 1 to 10? range(1,11) Numbers 5,10,15,20,25 to 100? range( ) Numbers 20,18,16, to 0? range( ) 2

AE1205 Programming Python Quiz: so how do we generate Numbers 1 to 10? range(1,11) Numbers 5,10,15,20,25 to 100? range(5,105,5) or range(5,101,5) Numbers 20,18,16, to 0? range( ) 3

AE1205 Programming Python Quiz: so how do we generate Numbers 1 to 10? range(1,11) Numbers 5,10,15,20,25 to 100? range(5,105,5) or range(5,101,5) Numbers 20,18,16, to 0? range(20,-2,-2) 4

AE1205 Programming Python Quiz: What will this print? print sum(range(1,11)) 5

AE1205 Programming Python Quiz: What will this print? print sum(range(1,11))

AE1205 Programming Python Quiz: What will this print? print sum(range(1,11)) Dus 10*11/2 = 55 So what does this print? print sum(range(1,101))

AE1205 Programming Python Quiz: What will this print? print sum(range(1,11)) Dus 10*11/2 = 55 So what does this print? print sum(range(1,101)) 5050

AE1205 Programming Python Quiz: what will this print? s=0 for x in range(3): for y in range(3): s = s + 1 print x,y print s,x,y Check 9 Answer: This is called: nested loops

AE1205 Programming Python Quiz: What will this print? x = 0. while x+5 > x*x: print x x = x

AE1205 Programming Python Quiz: What will this print? x = 0. while x+5 > x*x: print x x = x

AE1205 Programming Python Quiz: What will this print? x = 0. while x+5 > x*x: print x x = x

AE1205 Programming Python Quiz: What will this print? x = 0. while x+5 > x*x: print x x = x + 1. >>>