TECH19599 Exploring Information Technology Mobile Application Development (Control Statements)

Slides:



Advertisements
Similar presentations
GAME:IT Junior Learning Game Maker: The Control Tab.
Advertisements

Programming with App Inventor Computing Institute for K-12 Teachers Summer 2012 Workshop.
Making Decisions in Python Sec 9-10 Web Design. Objectives The student will: Understand how to make a decision in Python Understand the structure of an.
Events Chapter 7. Interactivity The real world is interactive User determines order of actions instead of programmer.
Events Chapter 7. Interactive Real world is interactive User determines order of actions instead of programmer.
Integer Tic Tac Toe Let’s Begin Rules: 1.Erase all x’s and o’s from the previous game before you begin. 2.Decide which player will be x’s and which will.
Programming with Alice Computing Institute for K-12 Teachers Summer 2011 Workshop.
Introduction to TouchDevelop
Mrs. Chapman. Tabs (Block Categories) Commands Available to use Script Area where you type your code Sprite Stage All sprites in this project.
CIS101 Introduction to Computing Week 11. Agenda Your questions Copy and Paste Assignment Practice Test JavaScript: Functions and Selection Lesson 06,
CIS101 Introduction to Computing Week 12 Spring 2004.
Programing App Inventor. Variable Declaration App Inventor: Declare Variables using the “Define Variable As” Block – Find the Blocks Editor (top-left),
Mr. Wortzman. Tabs (Block Categories) Available Blocks Script Area Sprite Stage All sprites in this project.
Chapter 5 Conditionals and Loops. © 2004 Pearson Addison-Wesley. All rights reserved2/33 Conditionals and Loops Now we will examine programming statements.
Android Apps: Building Blocks Module 6, Intro to I.T., Fall 2011 Sam Scott.
Android Apps: Look and Feel Module 6, Intro to I.T., Fall 2011 Sam Scott.
This will let you see the game you are going to play on the inside. It will help you see what all goes into creating instance to that goes into setting.
by Chris Brown under Prof. Susan Rodger Duke University June 2012
In.  This presentation will only make sense if you view it in presentation mode (hit F5). If you don’t do that there will be multiple slides that are.
Lecture 2: Static Methods, if statements, homework uploader.
MOM! Phineas and Ferb are … Aims:
Branching and Conditions CSIS 1595: Fundamentals of Programming and Problem Solving 1.
Programming with App Inventor Computing Institute for K-12 Teachers Summer 2012 Workshop.
Bug Session Four. Session description Objectives Session activities summary Resources Prior knowledge of sequencing instructions using Bug Bug website.
Learning the skills for programming Advanced Visual Programming.
1 Extend is a simulation tool to create models quickly, with all the blocks you need and without even having to type an equation. You can use a series.
Visual Basic Games: Week 4 Recap Parallel structures Initialization Prepare for Memory Scoring Shuffling Homework: when ready, move on to next game/chapter.
Chapter 5: More on the Selection Structure
Events (Alice In Action, Ch 6) Slides Credit: Joel Adams, Alice in Action CS 120 Lecture September 2012.
Python Selection. All the programs you have been developing so far have been sequential, this means that each instruction is executed in a set order.
Programming with App Inventor Computing Institute for K-12 Teachers Summer 2012 Workshop.
GUI development with Matlab: GUI Front Panel Components GUI development with Matlab: Other GUI Components 1 Other GUI components In this section, we will.
MIT App Inventor Lesson 4 – Decision Making. Agenda Comparisons ◦ Relational Operators Conditions (state checking) ◦ Boolean Operators.
Lecture 2 Conditional Statement. chcslonline.org Conditional Statements in PHP Conditional Statements are used for decision making. Different actions.
Conditionals Opening Discussion zWhat did we talk about last class? zDo you have any questions about the assignment? zPass by value limitations.
5.04 Apply Decision Making Structures
By Droids Robotics INTERMEDIATE PROGRAMMIN G LESSON DATA WIRES.
5 Event Handling Interactive Programming Suggested Reading Interaction: Events and Event Handling, Supplemental Text for CPSC 203 Distributed this term.
These Guys? Wait, What? Really?  Branching is a fundamental part of programming  It means taking an action based on decision  The decision is dependent.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 5 Decision Making.
Chapter 4 Select … Case Multiple-Selection Statement & Logical Operators 1 © by Pearson Education, Inc. All Rights Reserved. -Edited By Maysoon.
Lesson Seven: Using Flags. What Are Flags? Flags are Variables or Switches Used to Help With Logic Control of your character. Normally, Flags are used.
Computer Science Up Down Controls, Decisions and Random Numbers.
Objective of the lesson Use Blockly to make a dice for Snakes and Ladders All of you will: – Make an image which displays when you press a button Most.
IF STATEMENTS AND BOOLEAN EXPRESSIONS. BOOLEAN EXPRESSIONS Evaluate to a value of true or false Use relational or equivalence operators Boolean operators.
Tic – Tac – Toe ! Choose a square by clicking on “box #”
Chapter 4 Select…Case Multiple-Selection Statement & Logical Operators
Lesson 10: Building an App: Color Sleuth
Chapter 4 Select…Case Multiple-Selection Statement & Logical Operators
Microsoft Visual Basic 2005 BASICS
Lesson 8: Boolean Expressions and "if" Statements
INTERMEDIATE PROGRAMMING LESSON
Tic – Tac – Toe ! Choose a square by clicking on “box #”
INTERMEDIATE PROGRAMMING LESSON
HAPPY NEW YEAR! Lesson 7: If-statements unplugged
BBC Microbit.
Chapter 4 Select…Case Multiple-Selection Statement & Logical Operators
Tic – Tac – Toe ! Choose a square by clicking on “box #”
Tic – Tac – Toe ! Choose a square by clicking on “box #”
Chapter 4 Select…Case Multiple-Selection Statement & Logical Operators
Evaluate the limit: {image} Choose the correct answer from the following:
Chapter 4 Select…Case Multiple-Selection Statement & Logical Operators
PYTHON: BUILDING BLOCKS Sequencing & Selection
Chapter 3: Selection Structures: Making Decisions
Tic – Tac – Toe ! Choose a square by clicking on “box #”
Chapter 3: Selection Structures: Making Decisions
Tic – Tac – Toe ! Choose a square by clicking on “box #”
Chapter 4 Select…Case Multiple-Selection Statement & Logical Operators
Tic – Tac – Toe ! Choose a square by clicking on “box #”
Chapter 4 Select…Case Multiple-Selection Statement & Logical Operators
Presentation transcript:

TECH19599 Exploring Information Technology Mobile Application Development (Control Statements)

Goals of This Module Create more complex Apps. Use different events. Learn how to program more complex logic. Turn the Tic Tac Toe front end into a working App Exploring Information Technology-Pejman Salehi

Evaluation for This Module In class exercises – 3 marks Completing Tic Tac Toe project – 10 marks Exploring Information Technology-Pejman Salehi

Review Exercise Make an Application for Heads or Tails Game – Hint: Remember the Dice game When you click the button it shows 1 or 2 (randomly) Exploring Information Technology-Pejman Salehi

Overview So far our applications were simple We started from a set of inputs and executed to the end always the same way (for different inputs). What if based on some decisions programmer wants to change the execution path – For example show different images based on different values in Heads or Tails app Exploring Information Technology-Pejman Salehi

Overview Exploring Information Technology-Pejman Salehi Generate 1 or 2 randomly If it is 1 Show Yes No Show

Overview How? We call these selection (control) statements Selection is made based on certain conditions Example: The randomly generated value equals 1 Exploring Information Technology-Pejman Salehi

Comparison Operators Exploring Information Technology-Pejman Salehi OperatorDescription Less than Less than or equal to Greater than Greater than or equal to Equal to Not equal to

Example coin = 1 age <= 30 income > Exploring Information Technology-Pejman Salehi

Selection Statements Control blocks – If something is true then do this How? Exploring Information Technology-Pejman Salehi Test the Condition Do this if the condition is true

Example Exploring Information Technology-Pejman Salehi

Selection Statements What happens if the condition is not true? Nothing Exploring Information Technology-Pejman Salehi Test the Condition Do this if the condition is true

Selection Statements What happens if the condition is not true? Nothing What if we want to make something happen Exploring Information Technology-Pejman Salehi Test the Condition Do this if the condition is true Do this otherwise

Example Exploring Information Technology-Pejman Salehi

Now Your Turn Develop a simple app which says if an a number is positive of negative Modify the Heads or Tail App with proper icons Exploring Information Technology-Pejman Salehi

ListPicker In mobile apps users often need to select from list of options – Example: The user wants to pick the type of credit card (Master, Visa, AMEX) We use ListPicker to develop this functionality Exploring Information Technology-Pejman Salehi

ListPicker How? In App Inventor – You need to add a ListPicker element In Block Editor – You need to specify the options – You need to implement what will happen if the user select one of the options Exploring Information Technology-Pejman Salehi

ListPicker Let’s develop an app which gives the user to choose from the list of fruits and simple output the name of the fruit Specifying the options – Apple – Orange – Banana What happens if the user pick an item – Output the name of the element Exploring Information Technology-Pejman Salehi

Specifying the Options Exploring Information Technology-Pejman Salehi

Action Exploring Information Technology-Pejman Salehi

Now Your Turn Modify your math helper app from last class: – Add a ListPicker giving the user the option of choosing lb->Kg or inches->Cm conversion options – Using control blocks perform the correct conversion Exploring Information Technology-Pejman Salehi

How to Make Your App Talk! In App Inventor add a TextToSpeech element In Block Editor Exploring Information Technology-Pejman Salehi

Exercise Make your fruit selector App to say the name of the selected fruit – Add a button that say the name of the fruit when it is pressed Exploring Information Technology-Pejman Salehi