INQ241B
Mobile Apps
Day 1 Notes
Turtle Graphics
TouchDevelop
- Go to the TouchDevelop web site.
- Log in. Can use existing account or create new, this will allow you to save work.
- Create a new script,
Create New>blank turtle
, and give it a name.
Turtle
- Turtle is for making drawings using programming.
- To draw you move a ‘turtle’ around the screen, drawing lines as it moves.
- Note the existing line,
♻turtle→forward(100)
.
- Tap the
run main
button, the turtle moves forward and draws a line.
- Change the 100 to something smaller, what happens?
- Tap on the
♻turtle→forward(100)
line and click the +
button below it.
- From the array of buttons at the bottom, tap
♻turtle
.
- Then tap
left turn
, run the script.
- Note, lines of code are executed from top to bottom.
- So, how could be draw a square?
Quiz
- In a web browser, go to m.socrative.com.
- Enter room name ‘INQ241’.
- Enter your name.
Activity
- How to work with a partner.
- Go to Activity 1.
- Write the two scripts described.
- When complete show them to the instructor or lab assistant.