ROBINO ROBOTIC GROUP

python intermediate

Welcome     Call +60 16 9790 155    Follow us

python intermediate

Lessons

1. Meet Tina

Author: parsa

Tina is a Turtle that you control with code. Press run to see what this program does, and see if you can figure out what line tells Tina to say,”Why,…

2. Saying Hello

Author: parsa

Tina’s already said hello but you can tell her your name and she’ll say hello to you. First, find the line where Tina says “Why, hello there!”. Next, change it…

3. Moving

Author: parsa

As we saw in the last example, Tina can move! When she moves, she draws a line. She can move forward and backward and turn right or left a certain…

4. Color

Author: parsa

Tina can change into lots of colors! We can tell her to change into blue by typing tina.color(“blue”). Click run to see: Each color segment in the picture is created…

5. Tina’s pen

Author: parsa

Turtles like Tina have a pen that draws when they move. We can tell them to pick the pen up, so that they can move without drawing a line. Then…

6. Tina’s grid

Author: parsa

Tina’s world is a grid of squares like the one we sometimes use to graph in Algebra and Geometry. We can tell Tina to go directly to a specific point…

7. Going in Circles

Author: parsa

Tina can make circles of different sizes. Circles make it easy to make funny faces: The grid goes from -200 to 200 in both directions. You can send Tina to…

8. Lists of numbers

Author: parsa

Until now, we’ve had to write out numbers every time we want Tina to move. We can use a list of numbers and a loop to get her to move…

9. Loops of lists

Author: parsa

So far we’ve been telling Tina to do things over and over. Remember this example? There’s a lot of repetition. If we give Tina a list of colors and tell…

11. Turtles are Objects!

Author: parsa

Tina is a turtle. But what’s a turtle? It’s what’s called an object. This means that a programmer has written some code that we can use to do cool things.…

10. Changing Colors

Author: parsa

We can loop over a list of colors and tell Tina to turn that color. Run this program, and see where the colors come from. What happens if you add…

12. Tina and Tommy’s Colors

Author: parsa

Not only can we rename Turtles: we can have more than one! Let’s give Tina a friend named Tommy: Tina and Tommy are both drawing in black. Can you modify…

13. Logical Turtles

Author: parsa

Turtles are very logical. They can change what they do based on what we tell them. Run this program and answer the question. Tina will tell you whether you’re right!…

14. Tina asks how old you are

Author: parsa

Turtles can determine whether a number is above or below another number. Let’s write a program that asks how old you are: Advanced: In the example above you’ll see there…

15. How High Up is Tina?

Author: parsa

Tina can ask us things, and we can also tell her to ask herself things. In this example, we’ll tell her to go to a high or low spot on…

16. Functions are recipes!

Author: parsa

Functions are ways for us to have a program remember code we already wrote and do it again. They’re like recipes. We can use functions to teach Tina how to…

17. Make 5 cakes

Author: parsa

One of the great things about functions is that they can repeat complicated instructions without us having to repeat ourselves in code! Earlier we talked about how functions are like…

18. Say hello!

Author: parsa

Functions are recipes, but we can also give them special inputs called parameters that can make them slightly different each time. Turns out, we’ve already done this before! In the…

19. A Picture with Tina and Tommy

Author: parsa

Let’s take some time and make neat pictures with Tina and Tommy! Remember, since they’re both turtle objects, we can move them forward and backward, turn them left and right,…

20. Write a poem

Author: parsa

Since Tina knows how to write words on the screen, you can teach her to write a poem. This example provides you with a line() function to write lines of…

21. Share Your Progress!

Author: parsa

We’ve learned quite a lot in just a short time! We started with an example that looked a lot like the one below. Think about how much you’ve learned! Code…

User Registration

You don't have permission to register

Reset Password