Do it now activity Green pen activity in books.

Slides:



Advertisements
Similar presentations
Iteration While / until/ for loop. Iteration: while/ Do-while loops Iteration continues until condition is false: 3 important points to remember: 1.Initalise.
Advertisements

Computer Science 101 While Statement. Iteration: The While-Statement The syntax for the While- Statement is while : The syntax for the While- Statement.
While loops.
Python Mini-Course University of Oklahoma Department of Psychology Day 2 – Lesson 8 Fruitful Functions 05/02/09 Python Mini-Course: Day 2 - Lesson 8 1.
CS107 Introduction to Computer Science Lecture 3, 4 An Introduction to Algorithms: Loops.
A Level Computing#BristolMet Session Objectives#U2 S8 MUST identify the difference between a procedure and a function SHOULD explain the need for parameters.
Programming in python Lesson 2.
Dr. Yang, Qingxiong (with slides borrowed from Dr. Yuen, Joe) LT4: Control Flow - Loop CS2311 Computer Programming.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Chapter 6 Repetition Statements.
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”)
PROGRAMMING In Lesson 5. RECAP  Complete the starter activity.
Python – Part 4 Conditionals and Recursion. Modulus Operator Yields the remainder when first operand is divided by the second. >>>remainder=7%3 >>>print.
Flow of Control. 2 Control Structures Control structure: An instruction that determines the order in which other instructions in a program are executed.
Chapter 5 Repetition or loop structure. What is repetition or loop? repeat the execution of one or a group (block; instruction enclosed in a pair of braces)
Do it now activity Last term we learnt about how data is represented in a computer and about how to identify different volumes of data. How many bits in.
By the end of this session you should be able to...
Saeed Ghanbartehrani Summer 2015 Lecture Notes #5: Programming Structures IE 212: Computational Methods for Industrial Engineering.
PROGRAMMING In Lesson 2. STARTER ACTIVITY Complete the starter activity in your python folder – lesson 2 Now we will see how you got on and update your.
Python Programming Using Variables and input. Objectives We’re learning to use basic knowledge of variables combined with user input. Outcomes Continue.
For Code Next For Code Next A loop is a segment of a code that repeats (changing slightly each time)
Count Controlled Loops Look at the little children … Why is the sun’s face features orange …
Midterm Exam Topics (Prof. Chang's section) CMSC 201.
Topic: Control Statements. Recap of Sequence Control Structure Write a program that accepts the basic salary and allowance amount for an employee and.
GCSE Computing#BristolMet Session Objectives #23 MUST understand what is meant by the programming term iteration SHOULD describe methods of looping used.
Loops (While and For) CSE 1310 – Introduction to Computers and Programming 1.
For Loop GCSE Computer Science – Python. For Loop The for loop iterates over the items in a sequence, which can be a string or a list (we will discuss.
Python – Part 4 Conditionals and Recursion. Conditional execution If statement if x>0:# CONDITION print (‘x is positive’) Same structure as function definition.
Controlling Program Structures. Big Picture We are learning how to use structures to control the flow of our programs Last week we looked at If statements.
Getting Started With Python Brendan Routledge
Loops ( while and for ) CSE 1310 – Introduction to Computers and Programming Alexandra Stefan 1.
26/06/ Iteration Loops For … To … Next. 226/06/2016 Learning Objectives Define a program loop. State when a loop will end. State when the For.
Input, Output and Variables GCSE Computer Science – Python.
Follow up from lab See Magic8Ball.java Issues that you ran into.
Loops (While and For) CSE 1310 – Introduction to Computers and Programming 1.
Control Flow Constructs: Conditional Logic
Lesson 4 - Challenges.
Do it now activity Last lesson we used Flowol to create a solution to a problem a computer could solve. Identify what each symbol does:
Python: Control Structures
Lesson 05: Iterations Class Chat: Attendance: Participation
Think What will be the output?
Review If you want to display a floating-point number in a particular format use The DecimalFormat Class printf A loop is… a control structure that causes.
Iterations Programming Condition Controlled Loops (WHILE Loop)
Print slides for students reference
While loops The while loop executes the statement over and over as long as the boolean expression is true. The expression is evaluated first, so the statement.
LESSON 11 – WHILE LOOPS UNIT 5 – 1/10/17.
MSIS 655 Advanced Business Applications Programming
Do it now activity Since the beginning of the term you have planned a database based on your own scenario. Using your plan you are going to create a database,
Outline Altering flow of control Boolean expressions
Programming In Lesson 3.
Count Controlled Loops
Higher Computing Using Loops.
Iteration: Beyond the Basic PERFORM
Do … Loop Until (condition is true)
Fundamentals of visual basic
3.1 Iteration Loops For … To … Next 18/01/2019.
Computer Science Core Concepts
ICT Programming Lesson 3:
PYTHON: BUILDING BLOCKS Sequencing & Selection
A LESSON IN LOOPING What is a loop?
Flow of Control.
The structure of programming
Programming In Lesson 4.
Repetition Statements (Loops) - 2
LOOPS The loop is the control structure we use to specify that a statement or group of statements is to be repeatedly executed. Java provides three kinds.
Do it now activity Log onto the computer.
Data Types Every variable has a given data type. The most common data types are: String - Text made up of numbers, letters and characters. Integer - Whole.
Creating your game.
GCSE Computing Mini Assignment.
Iteration – While Loops
Presentation transcript:

Do it now activity Green pen activity in books

Understand how to use different types of loops in your programming AIM Understand how to use different types of loops in your programming

Learning objectives Demonstrated use of the following: While loop Until loop L7 EXT. Loop counter

know and use negation with operators. Learning outcomes By the end of this lesson you will be able to .... ALL (Level 4) use a variable and relational operators within a loop to govern termination MOST (Level 5) use a range of operators and expressions e.g. Boolean, and applies them in the context of program control. SOME (Level 6) know and use negation with operators.

Demonstrated use of the following: While loop Until loop Learning objectives New Learning Download and investigate the program called ‘until loop’ from www.Y8computing.weebly.com Term 4 Lesson 5 Iteration For Until Loop While Recursion

Independent task Can you adapt the code to: Demonstrated use of the following: While loop Until loop Learning objectives Independent task Can you adapt the code to: Keep asking the user a maths question until they get it correct? Can you use negation for this? Iteration For Until Loop While Recursion

Talk task What did the until loop do? Iteration For Until Loop While Demonstrated use of the following: While loop Until loop Learning objectives Talk task What did the until loop do? Iteration For Until Loop While Recursion

Copy Keyword Copy Keyword Demonstrated use of the following: While loop Until loop Learning objectives Copy Keyword Iteration: A group of instructions is executed repeatedly until a condition is met (loop) Copy Keyword Iteration For Until Loop While Recursion

Demonstrated use of the following: While loop Until loop Learning objectives Learning Development Download and investigate the program called ‘while loop’ from www.Y8computing.weebly.com Term 4 Lesson 5 Iteration For Until Loop While Recursion

Independent task Can you adapt the code to: Demonstrated use of the following: While loop Until loop Learning objectives Independent task Can you adapt the code to: Create a count down to blast off? Iteration For Until Loop While Recursion

Talk task What did the while loop do? Demonstrated use of the following: While loop Until loop Learning objectives Talk task What did the while loop do? How is this different to an until loop? Iteration For Until Loop While Recursion

Plenary Three stars and a wish. Input Integer Typecasting Float String Learning objectives Use int(input()) function Use float(input()) function Use input() function print sentences Plenary Three stars and a wish. Input Integer Typecasting Float String

know and use negation with operators. Learning outcomes I can .... ALL (Level 4) use a variable and relational operators within a loop to govern termination MOST (Level 5) use a range of operators and expressions e.g. Boolean, and applies them in the context of program control. SOME (Level 6) know and use negation with operators.