PYTHON PROGRAMMING Week 4 - Wednesday. x = 1 while True: print "Too infinity and beyond! " + str(x) x +=1.

Slides:



Advertisements
Similar presentations
I’ll Give. Yesterday I lived for me And I was so alone as I could be Then I saw You and how You give Yourself away And I want to live for You today.
Advertisements

P u t y o u r h e a d o n m y s h o u l d e r.
Decision Structures Chapter 4. Chapter 4 Objectives To understand: o What values can be stored in a Boolean variable o What sequence structures are and.
Pascal Programming Today Chapter 4 1 »Conditional statements allow the execution of one of a number of possible operations. »Conditional statements include:
Conditional Statements Introduction to Computing Science and Programming I.
James Tam Making Decisions In Python In this section of notes you will learn how to have your Pascal programs choose between alternative courses of action.
July 13 th.  If/ Else if / Else  Variable Scope  Nested if/else's  Switch statements  Conditional Operator.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie COMP 14 Introduction to Programming Adrian Ilie July 6, 2005.
2-1 Making Decisions Sample assignment statements PayAmount = Hours * Rate PayAmount = 40*Rate + (Hours – 40)*Rate*1.5.
Computer Science: A Structured Programming Approach Using C1 Objectives ❏ To understand basic loop concepts: ■ pretest loops and post-test loops ■ loop.
CSCI/CMPE 4341 Topic: Programming in Python Chapter 3: Control Structures (Part 1) – Exercises 1 Xiang Lian The University of Texas – Pan American Edinburg,
Do it now activity Correct the 8 syntax errors: Age = input(“How old are you?” If age = 10 Print(You are 10”) else: print(“You are not 10”)
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.
CSC 1051 M.A. Papalaskari, Villanova University Repetition CSC 1051 – Data Structures and Algorithms I Dr. Mary-Angela Papalaskari Department of Computing.
PYTHON PROGRAMMING Week 10 – Wednesday. TERMS – CHAPTER 1 Write down definitions for these terms:  Computation  Computability  Computing  Artificial.
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
Python Control Flow statements There are three control flow statements in Python - if, for and while.
Branching and Conditions CSIS 1595: Fundamentals of Programming and Problem Solving 1.
Decision Structures Chapter 4 Part 2. Chapter 4 Objectives To understand o What relational operators are and how they are used o Boolean logic o Testing.
While Loops CMSC 201. Overview Today we will learn about: Looping Structures While loops.
Agenda Exam #1 Review Modulus Conditionals Boolean Algebra Reading: Chapter Homework #5.
Conditions. Objectives  Understanding what altering the flow of control does on programs and being able to apply thee to design code  Look at why indentation.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley STARTING OUT WITH Python Python First Edition by Tony Gaddis Chapter 4 Decision.
PYTHON PROGRAMMING Week 6 - Tuesday. WHAT’S AN ALGORITHM?
1 Nassau Community CollegeProf. Vincent Costa Acknowledgements: An Introduction to Programming Using Visual Basic 2012, All Rights ReservedAn Introduction.
Computer Science: A Structured Programming Approach Using C1 5-2 Two-Way Selection The decision is described to the computer as a conditional statement.
Computer Science: A Structured Programming Approach Using C1 5-2 Two-Way Selection The decision is described to the computer as a conditional statement.
Python Mini-Course University of Oklahoma Department of Psychology Day 2 – Lesson 7 Conditionals and Loops 4/18/09 Python Mini-Course: Day 2 - Lesson 7.
COMP Flow of Control: Branching 1 Yi Hong May 19, 2015.
James Tam Making Decisions In Python In this section of notes you will learn how to have your programs choose between alternative courses of action.
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?
IT CS 200: C ONDITION Lect. Napat Amphaiphan. T HE ABILITY TO CONTROL THE FLOW OF YOUR PROGRAM, LETTING IT MAKE DECISIONS ON WHAT CODE TO EXECUTE 2.
CPSC 217 T03 Week V Part #1: Iteration Hubert (Sathaporn) Hu.
8. DECISION STRUCTURES Rocky K. C. Chang October 18, 2015 (Adapted from John Zelle’s slides)
PYTHON PROGRAMMING Week 5 - Tuesday. THE FRIENDSHIP ALGORITHM Note the infinite loop!
COMP 110 Branching Statements and Boolean Expressions Luv Kohli September 8, 2008 MWF 2-2:50 pm Sitterson
Lesson thirteen Conditional Statement "if- else" ©
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.
COMP Loop Statements Yi Hong May 21, 2015.
Debugging and Printing George Mason University. Today’s topics Review of Chapter 3: Printing and Debugging Go over examples and questions debugging in.
PYTHON PROGRAMMING Week 8 - Wednesday. STARTER Fizz Buzz  Let play the game!
Week 16 BIO Finals. No First Five Learning Target: Everything!! Today’s Activities: ● Review on your own...Tomorrow Questions! Notecard: ● Front side.
PYTHON PROGRAMMING Week 3 - Tuesday. STARTER Hour of Code Video.
Flow Control in Imperative Languages. Activity 1 What does the word: ‘Imperative’ mean? 5mins …having CONTROL and ORDER!
Chapter 3. Control Structure C++ Programing. Conditional structure C++ programming language provides following types of decision making statements. Click.
Introduction to Logic and Conditional Block Dr. José M. Reyes Álamo.
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.
Silberschatz and Galvin  C Programming Language Decision making in C Kingdom of Saudi Arabia Ministry of Higher Education Al-Majma’ah University.
CSC 1051 – Data Structures and Algorithms I Dr. Mary-Angela Papalaskari Department of Computing Sciences Villanova University Course website:
PYTHON IF-STATEMENTS. What you know If something is true, then something happens Example If you heat water to 100 degrees Celsius, then it boils If it.
Teaching KS3 Computing Session 4 Theory: Boolean logic AND/OR/NOT
CMIS 102 Competitive Success-- snaptutorial.com
CMIS 102 Education for Service-- snaptutorial.com
CMIS 102 Teaching Effectively-- snaptutorial.com
Chapter 6 Repetition Objectives ❏ To understand basic loop concepts:
Alice in Action with Java
2-1 Making Decisions Sample assignment statements
Homework 1 (parts 1 and 2) For the general system described by the following dynamics: We have the following algorithm for generating the Kalman gain and.
Teaching KS3 Computing Session 4 Theory: Boolean logic AND/OR/NOT
Lecture Notes – Week 3 Lecture-2
IST256 : Applications Programming for Information Systems
Computer Science Core Concepts
Chapter 7: Checking Comprehension
CHAPTER 5: Control Flow Tools (if statement)
Week 5 - Friday CS 121.
Presentation transcript:

PYTHON PROGRAMMING Week 4 - Wednesday

x = 1 while True: print "Too infinity and beyond! " + str(x) x +=1

YESTERDAY Conditionals and control flow

REMINDERS Homework  Bethany hand in  Check feedback – go through with me if you need to

TODAY Conditionals & Control flow  Work on exercises

CRIT / ACTIVITY Simple validation

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

RECAP Boolean expressions If…else If..elif…else / case statement Nested if

NEXT WEEK Functions Algorithm design

HOMEWORK Complete the Pyg Latin exercise in Codecademy