Presentation is loading. Please wait.

Presentation is loading. Please wait.

Explain what touch develop is to your students:

Similar presentations


Presentation on theme: "Explain what touch develop is to your students:"— Presentation transcript:

1 Explain what touch develop is to your students:
TouchDevelop is a programming environment that runs on your mobile devices. You write scripts by tapping on the screen. You do not need a separate PC or keyboard. Scripts can perform various tasks similar to regular apps. Any TouchDevelop user can install, run, edit, and publish scripts. You can share your scripts with other people by publishing them to the TouchDevelop script bazaar, or by submitting them as an app to the Windows Store or Windows Phone Store.

2 Learning Objective LO: Learn how to develop your own procedure and how to import libraries. Lesson Objective: - Students will learn to develop their own functions. They need to understand the importance of a function. In programming, a named section of a program that performs a specific task. In this sense, a function is a type of procedure or routine. Some programming languages make a distinction between a function, which returns a value, and a procedure, which performs some operation but does not return a value. – Webopedia. Basically your students will need to understand, that rather than re-writing code, over and over. They can call on something to complete the action over and over each time it is called.

3 Setting Up Touch Develop
Go to Sign in using a windows live ID. Click on the launch button in the middle of the screen. Click on the skill level button. Use the menu, to change it and click on coder. Walk your students through how to get logged on to the touch develop environment.

4 Setting Up Touch Develop
Click on the Create Script button Scroll down and select Blank Turtle Click on your previous script Walk your students through how to get logged on to the touch develop environment.

5 Starter Write out how you get to this lesson from your other class.
Then write out how you would navigate back to that classroom. (Time 5 mins) Get your students to write out how their route on how they get to school or a route through a building to the lesson. They will then need to write down the route to get back. Explain to them that tomorrow they’ll need to write the route again; Ask them the problem with doing this each time they need to do the route. Ask them what they could do rather than having to write it out all over again…. Link this into the lesson and explain how you can create something called a function which will do things over and over.

6 Learning Outcomes Use Touch develop to build an application which :
Use a procedure Uses a function Talk about what the students will be expected to achieve after their second lesson. This might take 2 lessons for some students but the help sheets will be attached to introduce this to younger students.

7 What can you notice? Show your students this piece of code and ask them if they think there is anything they could improve on? They probably won’t be able to see it but at the beginning of the game they have a huge list. We use functions to either return values or we can use something called a procedure. In this case, we’re going to use something called a procedure. Procedures are used so that we don’t have to repeat things over and over. We can just call on the procedure when it’s needed.

8 What can you notice? Now that the code has been organised you have created a procedure which keeps all of the code together. Now whenever I want to use the code. I simply call on BeeCharacter2. The second print screen shows how it works. You can see it runs the whole block. Teacher demonstration: - Now show your students how to do this. If you have done page switches with students in KODU, they will be able to see the link between these two.

9 Using a procedure Create a procedure click on new in the code section.
Name the procedure to something you can remember. I.E – Score setup Write out your code which would set up the score on the screen. Insert your procedure into main().

10 Creating a function A function usually uses values you’ve already set up and it returns the answer. Set up two new variables. Add two input parameters. Add output parameters. Include the calculation such as: R := P + P2 A parameter is a variable which is used within a function. For example if you were adding two numbers together you might use two different numbers. The output parameter is the answer which is returned: - return R

11 Using the function Click on code and pick the function you set up earlier. You can notice it’s looking for two zero’s which are the input variables. Change these parameters to variables you’ve set up. Convert them to string for them to work with text boxes. If they’re used as numbers you will not need to do this.


Download ppt "Explain what touch develop is to your students:"

Similar presentations


Ads by Google