Programing App Inventor. Variable Declaration App Inventor: Declare Variables using the “Define Variable As” Block – Find the Blocks Editor (top-left),

Slides:



Advertisements
Similar presentations
Programming with App Inventor Computing Institute for K-12 Teachers Summer 2012 Workshop.
Advertisements

Compose Workflow. Home page To compose a workflow navigate to the “Workflow Editor” page.
Understanding Microsoft Excel
Games in AppInventor ASFA Programming I November 14, 2012.
靜宜大學資管系 楊子青 1 Programming Your App’s Memory 靜宜大學資管系 楊子青
COMPREHENSIVE Windows Tutorial 3 Personalizing Your Windows Environment.
App Inventor Barb Ericson July 3, 2013.
Text Box controls are used when users are required to type some input (during program execution), or output is displayed on the form (known as the user-
MaskEdit Control The MaskEdit Control is an ActiveX Control that is a specialised version of a TextBox. MaskEdit’s allow for validation of input by ensuring.
An intro to programming concepts with Scratch Session 2 of 10 sessions I/O, variables, simple computing.
Computer Science 1620 Programming & Problem Solving.
Fundamentals of Programming in Visual Basic 3.1 Visual basic Objects Visual Basic programs display a Windows style screen (called a form) with boxes into.
Android Apps: Building Blocks Module 6, Intro to I.T., Fall 2011 Sam Scott.
MS-Access XP Lesson 5. Creating a Query with Expression Builder Eg. Consider the following table. Table Name: Overtime Fields & Data types: Emp No (Number),
Microsoft Visual Basic 2005 CHAPTER 12 Cell Phone Applications and Web Services.
Microsoft Visual Basic 2012 CHAPTER TWELVE (ENRICHMENT CHAPTER) Windows Store Apps.
Creating Mobile Apps with App Inventor! Day 5 Google search Kris Gordon Ludlow for links.
Quadratic Equation Solver Tutorial. Introduction We will be making an app to solve 2 nd level polynomials like ax 2 +bx+c. We will model our app upon.
Lab 8 – C# Programming Adding two numbers CSCI 6303 – Principles of I.T. Dr. Abraham Fall 2012.
Working with Numbers in Alice - Converting to integers and to strings - Rounding numbers. - Truncating Numbers Samantha Huerta under the direction of Professor.
Tutorial 6 Using Form Tools and Creating Custom Forms
Copyright ©: SAMSUNG & Samsung Hope for Youth. All rights reserved Tutorials Software: Building apps Suitable for: Advanced.
® Microsoft Access 2010 Tutorial 6 Using Form Tools and Creating Custom Forms.
Intro to AppInventor Dr. Dante Ciolfi (chawl fee).
Java Programming, 3e Concepts and Techniques Chapter 3 Section 65 – Manipulating Data Using Methods – Java Applet.
Using Form Tools and Creating Custom Forms Microsoft Access 2010.
Visual Programming Fall 2012 – FUUAST Topic: Development environment.
Introduction to Programming with Java. Overview What are the tools we are using – What is Java? This is the language that you use to write your program.
General Programming Introduction to Computing Science and Programming I.
Dr. Nuha El-KhaliliInternet Programming ( ) HTML Hyper Text Markup Language The language of web pages Maintained by the W3C
App Inventor MIT App Inventor.
GUI development with Matlab: GUI Front Panel Components 1 GUI front panel components In this section, we will look at -GUI front panel components -Programming.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 5 Decision Making.
Microsoft Visual Basic 2005 CHAPTER 7 Creating Web Applications.
Chapter 9 - VB.Net by Schneider1 Chapter 9 – Additional Controls and Objects 9.1 List Boxes, Combo Boxes, and the File-Opening Control The List Box Control.
COMPREHENSIVE Access Tutorial 6 Using Form Tools and Creating Custom Forms.
Quiz Me Tutorial. Introduction QuizMe is a trivia game (the example uses baseball) you can use as a template to build quizzes on any topic. The user steps.
Programming with Visual C++: Concepts and Projects Chapter 2B: Reading, Processing and Displaying Data (Tutorial)
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
Lecture 2 Conditional Statement. chcslonline.org Conditional Statements in PHP Conditional Statements are used for decision making. Different actions.
CMPF114 Computer Literacy Chapter 3 The Visual Basic Environment 1.
Introduction to Computer Programming - Project 2 Intro to Digital Technology.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
Microsoft Visual Basic 2012 CHAPTER FOUR Variables and Arithmetic Operations.
MIT App Inventor Lesson 3 Algorithms Variables Procedures.
Java With NetBeans First Project. Java Are language for this semester is Java The Development Environment is Netbeans.
COMPUTER PROGRAMMING I 3.01 Apply Controls Associated With Visual Studio Form.
Lesson 1 – Getting Started with App Inventor
Link for App Inventor II:
Visual Basic/ Visual Studio Brandon Large. Connecting to prior knowledge In your notes write down what the two main parts of the computer are. The “software”
Input, Variables, and Calculations. The TextBox Component Performing Calculations Storing Data with Variables Creating Blocks with Typeblocking The Slider.
Introduction to Programming and App Inventor. Introduction What is a computer program? Introducing App Inventor Getting hands on with App Inventor.
Understanding Microsoft Excel
Understanding Microsoft Excel
Introduction to Computing Science and Programming I
Procedures, Simple Expressions
Visual Programming week # 01
Visual Programming week # 02 APP (Application) Architecture.
3.01 Apply Controls Associated With Visual Studio Form
3.01 Apply Controls Associated With Visual Studio Form
Microsoft Visual Basic 2005 BASICS
Learning Java with Alice 3.0 Game Design Kathy Bierscheid
Understanding Microsoft Excel
Variables and Arithmetic Operations
More Selections BIS1523 – Lecture 9.
G7 programing language Teacher / Shamsa Hassan Alhassouni.
Visual Programming week # 06
Programming Lists of Data 靜宜大學資管系 楊子青
Understanding Microsoft Excel
Visual Programming week # 05 Lists Quiz Tutorial.
Presentation transcript:

Programing App Inventor

Variable Declaration App Inventor: Declare Variables using the “Define Variable As” Block – Find the Blocks Editor (top-left), click the Definition button, then pull out the correct block. – How would I make a variable named “count”???

Variable Assignment Assign a variable named “count” to 5 –In App Inventor, use “set global - to” block in the My Blocks Menu Only available once defined your variable Drag the “set global - to” block out Create a number block by typing in “5” in the editor window Click 5 into the “set global – to” block

App Inventor Math using Variables Combine the “Set-To” Block with operators from the “Built-In->Math” Menu Count = 9 Count = 5 Count = 14 Count = 3 Count = 1 (modulo gives the remainder of division)

Variable Initialization

You are forced to define a variables value when you declare it in App Inventor A general place for program initialization is the “When Screen1.Initialize” block – Note: Most Text-Based languages use the “main()” function as the start of the program – For example, set count to 100 when the program starts:

Implementing an Equation in App Inventor Area of a Rectangle = Length * Width – Step 1: What variables do we need? Area, Length, and Width – Step 2: Declare them in App Inventor – Step 3: Use Math. Operators to Implement

Output: The Label Component Label – Components used to show text. – Displays text specified by the Text property. – Useful Properties Text Width Visible Background Color

Output: The Image Component Image – Components used to show a picture – Displays text specified by the Picture property. – Useful Properties Picture Width Visible Height

Output: The Texting Component Texting – A non-visible component to allow users to send and receive text messages. – Useful Properties Message Phone Number Receiving Enabled (Does this also make the Texting component a input?)

Input: The Button Component Button – Components used to show text. – Displays text specified by the Text property. – Useful Properties Text Width Visible Background Color

Input: The TextBox Component TextBox – Components used to show text. – Displays text specified by the Text property. – Useful Properties Text Width Visible Background Color

Implementing the Algorithm: The Designer First, add the necessary components to in the Designer Window – 2 TextBoxes, a Button, and a Label – name your components AmountPaidBox TipPercentBox CalculateButton TipLabel – Remember, to put “Calculate Tip” on the button and remove the default label text

Next, need to declare and initialize our variables – Declare: amount_paid, tip_percentage, tip_amount – (Optional) Because it doesn’t make sense to have a 0% tip, let’s give it a default value of 5 and place that in the AmountTipBox at program startup

Next step: wait until the button is clicked Add a “When Button Clicked” Block to your code What’s the name of the button that needs to be clicked?

Next step: want us to get information from the textboxes What component variables (properties) represent the textbox data? What variables do we save this data to?

Next step: calculate the tip amount What variable represents the tip amount? Why do we divide tip percentage by 100???

Next step: display the tip amount to the user What component variables (properties) represent the label output?

Download to the Emulator and Test!!!

If-Blocks

Nesting If and If-Else Blocks Often times, we want to check if a prior condition is true, before checking another condition. – Example: If x > 100, then check if y is < 100. If y < 100, then assign z to 1. If x <= 100, set z to 35.

Implementation Step 1: Lamp Doesn’t Work – If-Block or If-Else Block? Why?

Step 2: Lamp Plugged In?

Step 3: Bulb Burned Out?