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

Slides:



Advertisements
Similar presentations
Week 4 Exit Slips What group challenge did you choose today? What do you need to do to meet the challenge?
Advertisements

WC Marketing blok 2 week 4. Agenda 50  3  1 ideas presentations 3  1 idea selection (indien nodig) Product concept worksheet Homework.
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.
Emma had $1 this morning and asked her mom for another. Instead, her mom said she would give Emma $2 the next day if she still had the dollar she was holding.
Many people will walk in and out of your life, But only true friends will leave footprints in your heart. If some one betrays you once, it is his fault;
IDL Tutorials: Day 4 Goal: Learn some programming techniques: Relational operators, conditional statements, boolean operators, loops Angela Des Jardins.
Exercise Exercise3.1 8 Exercise3.1 9 Exercise
Exercise Exercise Exercise Exercise
Exercise Exercise Exercise Exercise
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.
Exercise Exercise6.1 7 Exercise6.1 8 Exercise6.1 9.
Pipe Network  Pipe network is analyzed based on: 1. Conservation of mass 2. Conservation of energy.
Session 5: Methods of Organizing and Teaching CO Tuesday, July 10, 2002.
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.
Learning to Program with Python Sec 9-1 Web Design.
L.O: To Write Instructions. Why might we need instructions? Instructions.
By Alfredo Alvarez. Agenda: Find out who the instructor is. Talk about goals and why you want to learn python. Discuss the materials and the methodology.
One Key to Success.  Review homework & respond to questions ◦ ng%20Companion%2006/Personal/time/index.htm.
Abstraction IS 101Y/CMSC 101 Computational Thinking and Design Tuesday, September 17, 2013 Carolyn Seaman University of Maryland, Baltimore County.
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.
Alexander the Great. Do Now (U3D11) Read, “Do Now: Alexander as a Young Boy” Answer the two questions Homework: Finish your flow charts and bring to class.
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.
Python Lab: Control Statements Conditionals, Loops, Iterations Proteomics Informatics, Spring 2014 Week 4 18 th Feb, 2014
While Loops CMSC 201. Overview Today we will learn about: Looping Structures While loops.
Abstraction IS 101Y/CMSC 101 Computational Thinking and Design Tuesday, September 17, 2013 Marie desJardins University of Maryland, Baltimore County.
PYTHON PROGRAMING Week 15 – Tuesday.
PYTHON PROGRAMMING Week 6 - Tuesday. WHAT’S AN ALGORITHM?
Hey, Ferb, I know what we’re gonna do today! Aims: Use formatted printing. Use the “while” loop. Understand functions. Objectives: All: Understand and.
Fill the screen challenge! This is a starter activity and should take 3 minutes [ slide 1 ] 1.Log in to your computer 2.Open IDLE 3.In interactive mode,
IDL Tutorials: Day 4 Goal: Learn some programming techniques: Relational operators, conditional statements, boolean operators, loops Maria Kazachenko
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.
Life Computes: A simultaneous Eliot Bush, Zachary Dodds, Ran Libeskind-Hadas, Harvey Mudd College Curriculum If CS had a central dogma, it would probably.
WEEK 1 You have 10 seconds to name…
Week 3 BIO. Monday September 8, 2014 First Five: Write the meaning of each: syn- multi- -gram hemi- a- Learning Target: I can use the scientific process.
Lecture 4 Functions. 2 CodeCademy 4.a. 3 CodeCademy: comments.  As parameter of a function  Second way to introduce variables:  What do max, min,
WARM UP. ALGEBRA 3 CHAPTER 9: RATIONAL EQUATIONS AND FUNCTIONS LESSON 2: GRAPHING SIMPLE RATIONAL FUNCTIONS.
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.
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.
Some More Python Please ensure that you’re logged on and ready to start.
PYTHON PROGRAMMING Week 8 - Wednesday. STARTER Fizz Buzz  Let play the game!
Flow Charts WHAT ARE THEY AND WHY DO WE USE THEM?.
Q4.W7 Math – Monday 4/27/15 Today: Warm-up on back of weekly outline Grade 9.1 Quiz – Work on corrections in class today – No corrections on extra credit.
PYTHON PROGRAMMING Week 3 - Tuesday. STARTER Hour of Code Video.
NET FORCE CHALLENGE NET FORCES. ENTRY TASK: Q3 of the homework: Is the football player correct, or is the coach correct? Why?
PYTHON PROGRAMMING Week 5 - Wednesday. THE FRIENDSHIP ALGORITHM Note the infinite loop!
PYTHON PROGRAMMING Week 10 - Tuesday. GLOSSARY PROGRAM  Have a look at the program  Print it out.
Homework #1 Read Chapter 1(all), Chapter 2 (not 2.6) Exercises and Problems:1.3, 1.49, 1.99, 2.14, 2.39, 2.59 Due next Thursday, 1/31.
IT 210 Week 3 DQ 1 To purchase this material link 210-Week-3-DQ-1 For more courses visit our website
YEAR 12 COMPUTER SCIENCE.
Week 1, Day 4 Snakes Alive 31 June 2016.
Think What will be the output?
ALGORITHMS & FLOWCHARTING II
CMIS 102 Education for Service/tutorialrank.com
Teaching Computing to GCSE
Teaching KS3 Computing Session 4 Theory: Boolean logic AND/OR/NOT
For -G7 programing language Teacher / Shamsa Hassan Alhassouni.
Object Oriented Programming in A Level
Print the following triangle, using nested loops
2. The Student Library page
Do it now activity Log onto the computer.
Agenda *IR *Finish OMAM, Chapter 1 *Imagery in OMAM, Chapter 1
Python – May 25 Quiz Python’s imaging library Lab
Presentation transcript:

PYTHON PROGRAMMING Week 5 - Tuesday

THE FRIENDSHIP ALGORITHM Note the infinite loop!

LAST WEEK Conditionals and control flow

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

TODAY Algorithms  What is an algorithm?  How to write a simnple algorithm Python  Writing functions with and without parameters  How to call functions  Some library/built in functions

SIMPLE FUNCTION What does it do? Note  We can call it from IDLE  We can call it from another program  There is an existing functions that does this – max()  We can easily set up our own libraries of functions

ALGORITHM DESIGN Making a sandwich

ALGORTHM DESIGN Making Tea

PRACTICAL Codecademy:  Conditionals and Control Flow Plus  Exercises  Challenges

RECAP What is an algorithm? What is a function? A parameter? How can functions help us write complex programs?

TOMORROW More on algorithms  approaches to writing them  why functions are our friends Functions – practice Mastery Task 2

HOMEWORK Tomorrow!