python10

= Python - Lesson 10 =

Lesson 1 Lesson 2 Lesson 3 Lesson 4 Lesson 5 Lesson 6 Lesson 7Lesson 8 Lesson 9 Lesson 10 Lesson 11

Lesson Objectives

 * Use elif in python
 * Use Python to lead the turtle module
 * Create some pseudocode to explain the program

Success Criteria
(C-A*) Be able to write some pseudocode (C-A*) Program the turtle controller in Python

**Starter (10 mins)**
Research/Revise Make a note of the following Python information


 * 1) What does the elif function do?



Homework
On Google Classroom - please check which homework you need to revisit - they have been commented on for you....

Task (10 mins)
We are going to create a program to allow a user to draw with the turtle - this program will also include a user interface to make drawing easier for the user. In the code window add the code below (you don't need to add the comments) and save it as Turtle.py

Task (5 mins)
Run your program and DEBUG any errors in your code When it is error free it will display as below

Task (20 mins)
All programs need to be planned and one way of planning is to write some pseudocode

pseudocode is fake code which roughly explains what you are going to do in the program.

This program is going to allow the user to be a "string artist". That is to type a string of instructions which allow the turtle to draw something. For example the string to draw a square 100 pixels wide would be


 * F100-R90-F100-R90-F100-R90-F100 **

In the program above you already set the **do** and **val** commands. The **do** commands are the letters - the **val** commands are the numbers.

As a class we will write some pseudocode for this string artist part of the program

Plenary (5 mins)
Check yourself on Python - list the code words you have learned.