Friday, 18 December 2015

Christmas Python 2

Open Python IDLE 

Create a New File and save as Tree.py

Task
1. Create a variable called branches, set it to 12

2. Create a variable called baublesperbranch, set it to 3

3. Create a variable called totalbaubles, set it to 0

4. Create a program that will calculate the total number of baubles on the tree.

5. Modify your program to ask the user to input:     
i) the number of branches    ii) the number of baubles per branch

6. Modify your program to include other items.

7. Try using the Python Turtle to create a Christmas image HERE

Thursday, 17 December 2015

Christmas Python

Open Python IDLE 

Create a New File and save as Christmas.py

Task
1. Copy the code below in to the file and see what happens when you  Run (F5)

2. Can you modify the code to create your own image?

3. Can you find any other fun Christmas code on the Internet?

4. Try using the Python Turtle to create a Christmas image HERE

import turtle

screen = turtle.Screen()
screen.setup(800,600)

circle = turtle.Turtle()
circle.shape('circle')
circle.color('red')
circle.speed('fastest')
circle.up()

square = turtle.Turtle()
square.shape('square')
square.color('green')
square.speed('fastest')
square.up()

circle.goto(0,280)
circle.stamp()

k = 0
for i in range(1, 17):
    y = 30*i
    for j in range(i-k):
        x = 30*j
        square.goto(x,-y+280)
        square.stamp()
        square.goto(-x,-y+280)
        square.stamp()

    if i % 4 == 0:
        x =  30*(j+1)
        circle.color('red')
        circle.goto(-x,-y+280)
        circle.stamp()
        circle.goto(x,-y+280)
        circle.stamp()        
        k += 2

    if i % 4 == 3:
        x =  30*(j+1)
        circle.color('yellow')
        circle.goto(-x,-y+280)
        circle.stamp()
        circle.goto(x,-y+280)
        circle.stamp() 

square.color('brown')
for i in range(17,20):
    y = 30*i
    for j in range(3):    
        x = 30*j
        square.goto(x,-y+280)
        square.stamp()
        square.goto(-x,-y+280)
        square.stamp()        
        
turtle.exitonclick()

Wednesday, 9 December 2015

Unit - 2 - Lesson 4 - How Storage Works

Lesson Objectives
Understand how magnetic, optical and solid state storage actually work


Starter
Storage Wordsearch


Main






Extension Task
HERE

Monday, 7 December 2015

Hour of Code



Explore and Learn in your Hour of Code - HERE
7th - 13th December 2015


Friday, 4 December 2015

Y10 - Intro to Python - The Importance of Planning

Lesson Objectives

 - be able to apply flowcharts to a sequencing program 
 - understand the importance of planning before coding

Starter

Have a little fun on Lightbot - click HERE


Main
Red Task


Draw a flowchart to solve the following problems:
1.   
2. 



Amber Task
Using Flowcharts to plan Python programmes:
     


Python Challenge (Draw flowcharts for the following BEFORE you start coding)


1. SAVE AS rectangle.py
Challenge:
Ask a user for the LENGTH and WIDTH of a Rectangle, than calculate and print the AREA.



Green Task

Python Challenge (Draw flowcharts for the following BEFORE you start coding)



2. SAVE AS circle.py
Challenge:  
Ask a user for the RADIUS of a Circle, than calculate and print the AREA.



Plenary

Share with a partner the importance of planning BEFORE coding


Thursday, 3 December 2015

Y10 - Intro to Python L2

Lesson Objectives
 - Understand and be able to use basic Python Syntax


Starter

Can you spot the 3 syntax errors?

Main



Be sure to save ALL work in you PYTHON folder in your ICT folder







Plenary
Log-in to www.codecademy.com using your Google+ Wildern Details

Codecademy


Complete the Python Syntax section





Wednesday, 2 December 2015

Unit 2 - Lesson 3 - Storage

Lesson Objectives
Understand how magnetic media, optical media and solid state work

Starter

Storage Wordsearch


Main




Worksheet 3

Plenary
Log on to  -   (see sheet for Username and Password)