ITEC 109 Lecture 11 While loops. while loops Review Choices –1 st –2 nd to ?th –Last What happens if you only use ifs? Can you have just an else by itself?

Slides:



Advertisements
Similar presentations
Java Control Statements
Advertisements

Chapter 4: Control Structures I (Selection)
Iteration While / until/ for loop. Iteration: while/ Do-while loops Iteration continues until condition is false: 3 important points to remember: 1.Initalise.
Microsoft® Small Basic
Lecture Notes 3 Loops (Repetition)
Loops (Part 1) Computer Science Erwin High School Fall 2014.
Intro to Programming Algebra-Geometry. Computer Programming? What is programming? The process of writing, testing, and maintaining the source code of.
Intro to Java while loops pseudocode. 1 A “Loop” A simple but powerful mechanism for “making lots of things happen!” Performs a statement (or block) over.
Bkevil Solve Equations With Variables on Both Sides.
3-2 Solving Systems Algebraically (p. 125) Algebra 2 Prentice Hall, 2007.
Find opposites of numbers EXAMPLE 4 a. If a = – 2.5, then – a = – ( – 2.5 ) = 2.5. b. If a =, then – a = –
Girl Develop It Ottawa Introduction to Programming With Scratch Introduction.
COMP 1001: Introduction to Computers for Arts and Social Sciences Programming in Scratch Monday, May 16, 2011.
SOLVE EQUATIONS WITH VARIABLES ON BOTH RED CARD- NO SOLUTION YELLOW CARD- 1 SOLUTION GREEN CARD-INFINITE SOLUTIONS bkevil.
Objectives: To solve and graph simple and compound inequalities.
ㅎㅎ logical operator if if else switch while do while for Third step for Learning C++ Programming Repetition Control Structures.
TABLES AND VALUES Section 1.5. Open Sentence Equation.
Control Structures CPS120: Introduction to Computer Science Lecture 5.
What is gossip? When people spread rumors about another person it is called gossip. Gossip is talking about something that is not your problem.
Solve the following system using the elimination method.
Chapter 6 Questions Quick Quiz
Structured Programming The Basics. Control structures They control the order of execution What order statements will be done in, or whether they will.
Lecture 01b: C++ review Topics: if's and switch's while and for loops.
Conditionals Conditional statements, called conditionals for short, are statements in the if-then or if-then-else form. Examples: “If the alarm goes off,
IST 210: PHP LOGIC IST 210: Organization of Data IST210 1.
ITEC 109 Lecture 10 More on Repetition / Choices.
Flow Control in Imperative Languages. Activity 1 What does the word: ‘Imperative’ mean? 5mins …having CONTROL and ORDER!
Microsoft® Small Basic Conditions and Loops Estimated time to complete this lesson: 2 hours.
CMPT 120 Topic: Searching – Part 2 and Intro to Time Complexity (Algorithm Analysis)
Title Category #1 Category #2 Category #3Category #
Sensor Information: while loops and Boolean Logic.
IST 210: PHP Logic IST 210: Organization of Data IST2101.
Structured Programming The Basics
CIS3931 – Intro to JAVA Lecture Note Set 2 17-May-05.
Sequence, Selection, Iteration The IF Statement
Starter Write a program that asks the user if it is raining today.
پروتكل آموزش سلامت به مددجو
LESSON 11 – WHILE LOOPS UNIT 5 – 1/10/17.
Control Structures (Structured Programming) for controlling the procedural aspects of programming CS1110 – Kaminski.
Iteration with While You can say that again.
WARMUP 1. y > – x – 4 y < 2x + 2.
Introduction to pseudocode
Types, Truth, and Expressions (Part 2)
Solving Equations with Variables on Both Sides Day 2
Coding Concepts (Basics)
Three Special Structures – Case, Do While, and Do Until
Computer Science Core Concepts
Intro to Computer Science CS1510, Section 2 Dr. Sarah Diesburg
ICT Programming Lesson 3:
2/24/2019.
There are infinite solutions to the system.
SECTION 2-4 : SOLVING EQUATIONS WITH THE VARIABLE ON BOTH SIDES
Logical Operators and While Loops
Solve Equations With Variables on Both
Instructor: Craig Duckett
Starter....
Repetition Statements (Loops) - 2
Midterm Review October 23, 2006 ComS 207: Programming I (in Java)
Control Structures (Structured Programming) for controlling the procedural aspects of programming CS1110 – Kaminski.
·Answer in complete sentences ·Page 17 - # 2
Types, Truth, and Expressions
St. Augustine Preparatory School August 12 Lecture
Solving Equations with Variables on Both Sides Day 2
Review of Previous Lesson
Flow of Control Flow of control is the order in which a program performs actions. Up to this point, the order has been sequential. A branching statement.
Lecture 7 – Unit 1 – Chatbots Python – For loops + Robustness
Recapitulation of Lecture 13
True or False True or False
COMPUTING.
G6DICP - Lecture 5 Control Structures.
Presentation transcript:

ITEC 109 Lecture 11 While loops

while loops Review Choices –1 st –2 nd to ?th –Last What happens if you only use ifs? Can you have just an else by itself? Homework ?s –iterate + if / else if

while loops Objectives Exam on Tuesday –True / False –Short Answer –Write a simple program –Tell me what a program does Learn the last intro concept –While loops

while loops Problem Need to repeat statement(s) Don’t know the # until program runs

while loops Solution Use boolean variables or operations while (boolean) do X statements go = true; while (go): Statements Some statement that sets go to be false