Introduction to TouchDevelop

Slides:



Advertisements
Similar presentations
Instructions Go to:- insert, picture, clip art & select a picture of your choice using the search text on the right of the screen. Click on it once &
Advertisements

Introduction to TouchDevelop
1 of 3 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
Screens naming screens and concepts Disclaimer: This document is provided “as-is”. Information and views expressed in this document, including URL and.
Introduction to TouchDevelop
This is Google Drive. It stores all the documents you have made here.
Human Geography for Teachers: GCU673 Arizona State University Valerie Mervine.
Google Training By: Amy Shannon and Dave Auwerda.
Introduction to TouchDevelop
Welcome message. The background image would be an image of Electronic Circuit And have a flash action script to animate 0 and 1. This site would be for.
Introduction to TouchDevelop
Downloading and Installing Autodesk Revit 2016
Introduction to touchdevelop statements overview Disclaimer: This document is provided “as-is”. Information and views expressed in this document, including.
Downloading and Installing Autodesk Inventor Professional 2015 This is a 4 step process 1.Register with the Autodesk Student Community 2.Downloading the.
Piñata Game: Keeping Score in Alice By Maggie Bashford Professor Susan Rodger Duke University July
Lab 1 : Introduction to LabView 1 Southern Methodist University Bryan Rodriguez.
Getting started with the turtle Find the latest version of this document at
Using MIT Scratch for Programming and Control Exercise 1 Creating movement Year 11 DTG 2012.
Introduction to touchdevelop statements overview Disclaimer: This document is provided “as-is”. Information and views expressed in this document, including.
Introduction to TouchDevelop Lesson 3 – Comments & Lists Created by S. Johnson
Screens naming screens and concepts v2.8 Disclaimer: This document is provided “as-is”. Information and views expressed in this document, including URL.
Conditionals.
1 Agenda  Unit 7: Introduction to Programming Using JavaScript T. Jumana Abu Shmais – AOU - Riyadh.
AN INTRODUCTION TO FACEBOOK. Learning Objectives A brief introduction to the social networking site Facebook. Instructions to create an account. How to.
Boxes. boxes- learning targets o I will be able to display buttons (boxes) o I will be able to organize boxes o I will be able to create an animation.
Perform a complete mail merge Lesson 14 By the end of this lesson you will be able to complete the following: Use the Mail Merge Wizard to perform a basic.
Boxes. SOUNDBOARD Objective: Tap the boxes to play sounds! Demo:
Sanitary Inspector/Engineer Learning Module For Swachh City- Swachh Bharat app Android Play store - SBM Engineer App.
Scratch Programming Cards
Welcome to the MyLearningPlan.Com
Unit 2 Technology Systems
Class-Level Variables in Alice
Development Environment
Computer Literacy BASICS
Bbc microbit Lesson 3 – Temperature hot medium.
Games Programming in Scratch
Creating an Account on Wikieducator
Microsoft Official Academic Course, Microsoft Access 2013
Reviewing Documents Guided Lesson.
Lessons learned.
Getting started with Poll Everywhere Back to University 2017 Edition.
Basic Google Calendar in the Library
Explain what touch develop is to your students:
Microsoft Word Reviewing Documents.
Lesson 7: Plan a Presentation
Lesson 7 Plan a Presentation
Microsoft Office Illustrated Introductory, Windows XP Edition
Microsoft Word - Formatting Pages
Explain what touch develop is to your students:
Microsoft Official Academic Course, Access 2016
Lesson 7 Plan a Presentation
Introduction to TouchDevelop
About Everything You Always Wanted to Know
T. Jumana Abu Shmais – AOU - Riyadh
Introduction to TouchDevelop
Lesson 7 Plan a Presentation
Explain what touch develop is to your students:
Whatcha doin'? Aims: Begin to create GUI applications. Objectives:
Computer Science Projects Database Theory / Prototypes
BELLWORK Jackie Chan is frustrated because he does not understand what a blog is. Explain to Mr. Chan what a blog is before he karate chops you out of.
Explain what touch develop is to your students:
Explain what touch develop is to your students:
Explain what touch develop is to your students:
Introduction to PowerPoint
Explain what touch develop is to your students:
Just Basic Lessons Mr. Kalmes.
CMPT 120 Lecture 3 - Introduction to Computing Science – Programming language, Variables, Strings, Lists and Modules.
Web Programming and Design
An Introduction to Designing and Executing Workflows with Taverna
Presentation transcript:

Introduction to TouchDevelop 8 Lesson 3 – Comments & Lists Magic 8-Ball Created by S. Johnson - www.touchdevelop.weebly.com

Learning objectives Understand the purpose of a list Create and call a list Understand the purpose of comments in code Created by S. Johnson - www.touchdevelop.weebly.com

Getting started Open the TouchDevelop app by visiting http://touchdevelop.com/ Login to your account Tap “Create Script” Choose “blank” Created by S. Johnson - www.touchdevelop.weebly.com

Getting started …. Give your script a name Click on “create” Created by S. Johnson - www.touchdevelop.weebly.com

Comments Comments are bits of text to explain what different bits of code do. Comments are VERY important in coding. Comments make it easier for someone else looking at your code to understand. Comments also act as a reminder when looking back at your code. In TouchDevelop, comments are added using the Insert Comment command Created by S. Johnson - www.touchdevelop.weebly.com

Comments Go to ▷ main() Tap on do nothing Let’s add our first comment to explain our first line of code: Tap on the “Insert Comments” button in the lower left keypad. Tip: If you can’t see the Insert comment button, click on the blue arrow button to cycle through all the available options. Created by S. Johnson - www.touchdevelop.weebly.com

Comments continued … Type in “This next line sets the background picture” Created by S. Johnson - www.touchdevelop.weebly.com

Setting the background Let’s use an image of a Magic 8 Ball for our background. Go to ▷main() Add a new line Tap on wall in the lower right keyboard Tap on set background picture If you can’t see the set background button, click on the blue arrow button Created by S. Johnson - www.touchdevelop.weebly.com

Setting the background continued… Tap on art Let's use a picture a user has already loaded. Tap on the search bar and type in magic8 After a couple seconds, you should see various images of 8 balls on the left pane. Tap the picture you want to use, it will automatically be added as an art resource to your game. Your code should look like this: Created by S. Johnson - www.touchdevelop.weebly.com

Collections (Lists) Most programming languages have some way of creating a collection of items, usually this takes the form of an Array or Linked List. In TouchDevelop, a collection of items is simply referred to as a collection! A collection can contain a variety of things e.g. text, numbers, images etc. In this exercise you are going to create a string collection to store your magic 8 ball responses. Created by S. Johnson - www.touchdevelop.weebly.com

Collections continued … Add a new line Tap on collections Tap on create string collection Next we need to store our collection in a variable Created by S. Johnson - www.touchdevelop.weebly.com

Collections continued 2… Tap on store in var in the lower right keyboard. By default, TouchDevelop will automatically assign a name for each new variable (see below). Let's give the variable a more meaningful name. Tap on rename Type in response Created by S. Johnson - www.touchdevelop.weebly.com

Collections continued 2… Next we need to add our responses to our collection. Add a new line Tap on response Let’s add our first response Tap on add Tap on edit Type in it is certain Created by S. Johnson - www.touchdevelop.weebly.com

Collections continued 3… Repeat the previous step for each of the following responses: Without a doubt Most likely Outlook good Ask again later Cannot predict now Don't count on it My sources say no Created by S. Johnson - www.touchdevelop.weebly.com

Collections continued 4… Your code should look like this: Created by S. Johnson - www.touchdevelop.weebly.com

User Input Next, we need to instruct the user to type in a yes / no question. Tap on wall in the lower right keyboard. Tap on ask string. If you can’t see the ask string button, click on the blue arrow button Your code Tap edit on the lower right keyboard Type in an instruction for the user e.g. Please type in a yes / no question Tap on store in var Created by S. Johnson - www.touchdevelop.weebly.com

Displaying a response Next let’s add a random response from our collection. To do this, we use the random command. Add a new line Tap on response Tap on random Tap on store in var Tap on rename Type in result Created by S. Johnson - www.touchdevelop.weebly.com

Displaying a response continued … Your code should look like this: Finally, let’s display our response on the screen Add a new line Tap on result Tap on post to wall Run your game to see what happens Created by S. Johnson - www.touchdevelop.weebly.com

TouchDevelop Challenge 8 Magic 8 Ball Challenge Created by S. Johnson - www.touchdevelop.weebly.com

Challenge 1 Below is a complete set of responses for the Magic 8 Ball game. Add the remaining responses to your collection to complete the game: It is certain Better not tell you now It is decidedly so Cannot predict now Without a doubt Concentrate and ask again Yes definitely You may rely on it Don't count on it As I see it, yes My reply is no Most likely My sources say no Outlook good Outlook not so good Yes Very doubtful Signs point to yes Reply hazy try again Ask again later Created by S. Johnson - www.touchdevelop.weebly.com

Challenge 2 Go through your code and add more comments Created by S. Johnson - www.touchdevelop.weebly.com