PYTHON PROGRAMMING Week 5 - Wednesday. THE FRIENDSHIP ALGORITHM https://www.youtube.com/watch?v=k0xgjUhEG3U Note the infinite loop!

Slides:



Advertisements
Similar presentations
Chapter 1: Time Management You are in charge of your time management. Everyone gets the same hours in a day—24. What you do with your time in college is.
Advertisements

CMNS October Assignment 4 Due Oct. 26 Three page report includes Discussion Analysis Ideas An appendix with the following Interview schedule.
Ch 10.3 – Writing 2-step Equations
While: Indefinite Loops Sec 8-14 Web Design. Objectives The student will: Understand what an Indefinite Loop is Understand how create an indefinite loop.
Main Index Contents 11 Main Index Contents Week 10 – Recursive Algorithms.
Today we will: Have a group writing and discussion exercise; Go over the assignments for Unit 1; Be introduced to visual analysis and the concept of the.
Faculty of Sciences and Social Sciences HOPE Java: Loops within loops Stewart Blakeway FML 213
Lecture 33 CSE 331 Nov 20, Homeworks Submit HW 9 by 1:10PM HW 8 solutions at the end of the lecture.
16/23/2015 9:48 AM6/23/2015 9:48 AM6/23/2015 9:48 AMRecursion Recursion Recursion is when a function calls itself to implement an algorithm. Really a paradigm.
WHICH WAY and HOW FAR? SCALE AND DIRECTION What is scale and direction?
Factors affecting population density in China and the UK LO: To explain and compare the human and physical factors that have an impact of the 2 countries.
Chapter solving Equations by Multiplying or dividing
PYTHON PROGRAMMING Week 9 - Wednesday. WRITE A PROGRAM TO:  print all the numbers from 1 to 100  print all the even numbers from 1 to 100  print all.
How do you simplify? Simple Complicated.
LING 408/508: Programming for Linguists Lecture 19 November 4 th.
1 Spidering the Web in Python CSC 161: The Art of Programming Prof. Henry Kautz 11/23/2009.
PYTHON PROGRAMMING Week 10 – Wednesday. TERMS – CHAPTER 1 Write down definitions for these terms:  Computation  Computability  Computing  Artificial.
PYTHON PROGRAMMING Week 8 - Wednesday. WHAT DO THESE DO? for x in range(5): print x for x in range(1,5): print x for x in range(1,5): print x**2 numbers.
Introduction to Programming. What is a Program  Set of Instructions that tells the computer what to Do.  Driving force behind the computer  Without.
PYTHON PROGRAMMING Week 14 – Tuesday. STARTER You need to find out the average of a set of exam marks for a class. You don’t know how many marks there.
Class-level Methods Chapter 6 part 1. Classes and Objects Classes o In Alice, classes are predefined as 3D models Objects o An object is an instance of.
Puberty KK2. Research puberty using a variety of resources TASK : Develop an information booklet for prepubescent children.
Q1.W4 Math 8Tuesday 9/8/15 Today : o Welcome! New assigned seats o Good things! o Warm-up o Student Jobs o Check last Thursdays homework - Report score.
Modular Programming. Modular Programming (1/6) Modular programming  Goes hand-in-hand with stepwise refinement and incremental development  Makes the.
COMP 171: Principles of Computer Science I John Barr.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley STARTING OUT WITH Python Python First Edition by Tony Gaddis Chapter 3 Simple.
Class Collaboration with Edmodo. What is Edmodo? - Cliphttp:// social learning network for teachers, students,
 1. If 2x + 5y = –20 and x = 0, what is y ? 2. What is the slope of the line containing the points (2, 7) and (3, –10) ?
9/20/6Lecture 3 - Instruction Set - Al1 Program Design.
PYTHON PROGRAMING Week 15 – Tuesday.
Open House Geometry. Open House Agenda.
Tuesday 9/2 Quick Review n. Review Video Improper and Mixed Fractions.
PYTHON PROGRAMMING Week 6 - Tuesday. WHAT’S AN ALGORITHM?
Starter A delegate comes to you (the receptions) and tell you they have lost their timetable (itinerary) What details would you ask them for to check the.
Review homework on Research, draw and annotate your choice of data and complete two of today’s techniques on the same data. In pairs can you think of 3.
Wednesday, October 31, 2012 Binder Test Correlative Conjunctions Thesaurus Skills Library Homework: Read for AR (Points are due this Friday) This Friday.
Trinity College Dublin, The University of Dublin GE3M25: Computer Programming for Biologists Python Karsten Hokamp, PhD Genetics TCD, 03/11/2015.
PYTHON PROGRAMMING Week 12 – Tuesday. STARTER What is a flowchart? Do you know any of the symbols used in a flowchart and what they mean?
Peeking at Programming with JavaScript. So what’s JavaScript ? A programming language built into your Web Browser program. Adds fun and interactivity.
PYTHON PROGRAMMING Week 5 - Tuesday. THE FRIENDSHIP ALGORITHM Note the infinite loop!
Week Oct Monday. 10/26 Complete presentations in class Entry Task:- What pointers would you give when planning a presentation? Learning Target:-
PYTHON PROGRAMMING Week 4 - Wednesday. x = 1 while True: print "Too infinity and beyond! " + str(x) x +=1.
Sentences and Questions This game includes present and past tenses. The aim of the game is to match the questions to the sentences. Print the pages. Laminate.
5.2 Dividing Monomials Objective: To simplify quotients of monomials and to find the GCF of several monomials. Warm – up: 1) Write the prime factorization.
PYTHON PROGRAMMING Week 8 - Wednesday. STARTER Fizz Buzz  Let play the game!
PYTHON PROGRAMMING Week 3 - Tuesday. STARTER Hour of Code Video.
What does “digital divide” mean to you?. Session 12: Key Issues in technology in education + Technology and the professional teacher.
PYTHON PROGRAMMING Week 10 - Tuesday. GLOSSARY PROGRAM  Have a look at the program  Print it out.
Winter 2016CISC101 - Prof. McLeod1 CISC101 Reminders Assignment 5 is posted. Exercise 8 is very similar to what you will be doing with assignment 5. Exam.
Lesson 06: Functions Class Participation: Class Chat:
Computer Programming.
Exam #1 You will have exactly 30 Mins to complete the exam.
Week 1, Day 4 Snakes Alive 31 June 2016.
Stage 11: Artist: Nested Loops
Building Java Programs
Building Java Programs
Teaching Computing to GCSE
Building Java Programs
Teaching KS3 Computing Session 4 Theory: Boolean logic AND/OR/NOT
For -G7 programing language Teacher / Shamsa Hassan Alhassouni.
Building Java Programs
G7 programing language Teacher / Shamsa Hassan Alhassouni.
Lesson 06: Functions Class Chat: Attendance: Participation
Building Java Programs
Introduction to Computer Science
Print the following triangle, using nested loops
2. The Student Library page
1. I tried to speak Spanish, and my friend tried to speak French.
Python – May 25 Quiz Python’s imaging library Lab
Presentation transcript:

PYTHON PROGRAMMING Week 5 - Wednesday

THE FRIENDSHIP ALGORITHM Note the infinite loop!

YESTERDAY What is an algorithm? What is a function? What is a parameter?

REMINDERS Key Terms & Concepts – weeks 1 & 2 Print out programs and annotate them

TODAY Algorithms  Writing simple algorithms  Stepwise refinement Python  Writing functions with and without parameters  How to call functions  Some library/built in functions

YOUR OWN LIBRARY OF FUNCTIONS We can create a file of useful functions and then import it into other programs we write. Why bother? Reuse Divide work Easy to test Use as building bricks Reduce complexity Functions are our friends!

ALGORTHM DESIGN Stepwise refinement p20 - read Questions 1 – 6 (p20-21) – work in pairs

MASTERY TASK 2 On Edmodo for you to complete in class today

PRACTICAL Codecademy:  Functions Plus  Exercises  Challenges

RECAP What is an algorithm? Stepwise refinement?

NEXT WEEK More on algorithms  approaches to writing them  why functions are our friends More on functions - Codecademy

HOMEWORK Read page 21 and complete questions 8, 9 and 10 on the next page. Challenge: Create a Python program for question 10