Wednesday, 28 January 2015

Data Representation - ASCII

Lesson Objectives

 - understand how characters are represented in binary
 - be familiar with ASCII and it's limitations 


Starter

Download the ASCII code sheet HERE and save it to your SITES - Computer Science folder

Main

Every time a character is typed on a keyboard, a code number is transmitted to the computer. The code numbers are stored in binary. Different sets of codes are available for different types of computer. PCs use a character set called ASCII, American Standard Code for Information Interchange

A character set is a group of characters that can be coded.

Red Task
Write your first name in ASCII code and Binary, then add it to your blog.


eg. Tom = 84, 111, 109 (in ASCII), and 01010100   01101111   01101101  (in Binary)

Part of the ASCII table is shown below:

Challenge: 
Demonstrate how  many bytes your name uses? Save it in Notepad and see.
 

Orange Task
Can you finish the code to work out what the following says?


Write your own coded message in ASCII code and ask a friend to decipher it. 

Can you work out what the following says:

073 032 108 111 118 101 032 067 111 109 112 117 116 101 114 032 083 099 105 101 110 099 101



Green Task
Look up the term ASCII Art - see examples below:




Try it for yourself - Text ASCII Art Generator – A web app that lets you type in large ASCII Art text lettering.


Plenary
On your blog answer the following questions:


1. What does ASCII stand for?
2. When was ASCII invented and why?
3. Give one problem with ASCII code and explain how this was overcome.
4. Name one other character set and briefly explain how it is different from ASCII.


Extension
The 8th bit in a string of binary code is called the parity bit - write a paragraph on your blog to explain what this does exactly?


Useful websites:

Monday, 26 January 2015

Data Representation - Binary Lesson 2

Lesson Objectives

 
- understand the terms bit, nibble, byte, kilobyte, megabyte, gigabyte and terabyte
- demonstrate how to convert Binary to Denary




Starter
Copy the following link to your Blog under the heading - 
Binary Translator

http://binarytranslator.com/



Main

Save and complete the sheet HERE as Binary Work in your 

SITES - COMPUTER SCIENCE folder 

Plenary

Binary Quiz - you'll need to Log in Log on to the Computing Academy website.

Click on the cog icon to log in.  
 


Extension


Find a video on Binary of no more than 10 mins to embed to your blog post.
Want to know more?

Thursday, 22 January 2015

Python - Restaurant Challenge

Lesson Objectives

 - identify the InputsProcesses and Outputs of a simple program
 - document the planning by creating a flowchart for the program
 - use programming skills to create a simple program


Starter



Read through the Restaurant Challenge below:

Step One:
Write a simple program to calculate the cost per person of a  £100 meal. It should ask the user for the number of people dining. Your program should then calculate the cost of the meal per person and print what each person needs to pay.


Step Two: Rather than setting the meal cost to £100, your program should ask the user for the total cost of the meal AND how many people were dining. It should then calculate the cost of the meal per person. 



Step Three:: Your diners would like to pay a 15% tip. Your program should ask the user for the total cost of the meal AND how many people were dining. It should then calculate a 15% tip and the new total cost of the meal per person. 


Step Four:: Rather than setting the tip to 15%, your program should ask your user what percentage of tip your diners would like to pay. Your program should then ask the user for the total cost of the meal, including tip AND how many people were dining. It should then calculate the total cost of the meal per person, including tip. 


Task
Identify the InputsProcesses and Outputs for this problem, don't forget to name your variables


Main

Red Task:
1. Create a flowchart using draw.io to plan your solution
2. Build your solution in Python


Orange Task:
1. Test your solution using a variety of data - floats, text, integers
2. Use a blank Python Challenges document  - HERE - to evidence your work


Green Task
1. Research how you could improve your program to check the user has not entered text by mistake, instead of numbers?
2. Include this in your program


Plenary


Add your flowchart and a screenshot of your code to your blog with a post title Restaurant Challenge.


Tuesday, 20 January 2015

Data Representation - Binary Lesson 2

Lesson Objectives

 
- understand the terms bit, nibble, byte, kilobyte, megabyte, gigabyte and terabyte
- demonstrate how to convert Binary to Denary




Starter
Copy the following link to your Blog under the heading -
Binary Translator

http://binarytranslator.com/



Main

Save and complete the sheet HERE as Binary Work in your 

SITES - COMPUTER SCIENCE folder 


Plenary

Binary Quiz - you'll need to Log in Log on to the Computing Academy website.

Click on the cog icon to log in.  
 


Extension


Find a video on Binary of no more than 10 mins to embed to your blog post.
Want to know more?

Friday, 16 January 2015

Python Evidence - Session 4 Functions

 Using Python Basics - Level 1 
 Chapter 4 Functions - pg 45-54

Lesson Objectives

 - learn the structure of functions
 - write your own functions
 - create a program using functions




Starter
Try typing the following into Python Interactive mode;

Press Return twice, then type count(10) - What happens?  - see pg 46

Main
A function is a piece of code that performs a specific task.
You already know some pre-built functions, such as print()

Red Task
Create a function that produces the times table. Remember to start by defining the function and giving an argument.


 

 Use pg 46 to help you if you get stuck


~~~Evidence~~~
1. Create a program that will print out the times table for any specified number 
- print it, stick it in your book and write a note to explain the structure of the function


Orange Task
Make your program a little more complex by adding a second argument that will allow the user to decide how far through the tables to go:

 See pg 56



~~~Evidence~~~ 
1. Write a program using a second argument 
 - print it, stick it in your book and write a note to explain why it is better than your first program today


Green Task
Copy out the code for the number guessing game on pg51. 
Run it to check that it works.

ExtensionTry Ideas 1 to 4 on pg 53 - 54
  




Blog Post (to finish for hwk)
Add the following notes/code snippets to your  blog entitled
 'The structure of a 
function' 

Plenary
Further reading:
 - http://learnpythonthehardway.org/book/ex19.html
 - http://usingpython.com/python-functions/

Homeowrk
Spend at leasst 30 minutes working on Code Academy - http://www.codecademy.com/learn

Tuesday, 13 January 2015

Data Representation - Binary Lesson 1

Lesson Objectives

  - demonstrate how to convert Binary to Denary
  - understand the terms bit, nibble, byte, kilobyte, megabyte, gigabyte, terabyte

Starter

What do you know about Bits, Bytes and Nibbles?

 

TASK: Complete the Bits, Bytes, Megabytes and more sheet

Get help HERE



Main
Imagine you're back in Primary School and you're looking at numbers. You would probably be looking at Hundreds, Tens and Units - this is known as the denary system - base 10. The denary system uses the numbers 0-9.


Computers ONLY understand the numbers 1 and 0 - this relates to electric charges that are either ON (1) or OFF (0). 

Therefore, when working with computers we must understand the Binary system - base 2.


Red Task
Have a go at completing the sheet to help you convert Binary to Decimal



TIP: Make yourself some Binary Cards if that helps.......


Play the Binary Game - HERE


Orange Task
Create a poster to explain basic Binary to a KS3 student and add an image of it to your blog.

See examples:


Green Task

Binary Jigsaw click HERE



Extension
Answer the following questions on your Blog.
  1. What is meant by the terms bit, nibble, byte, kilobyte, megabyte?
  2. Why isn't a kilobyte 1000 bytes, and how does this relate to Binary?
  3. What do you notice about the number 255 in Binary?


Plenary

Complete the Bits and Binary TEST



Wednesday, 7 January 2015

Python Evidence - Session 4 - Functions

 Using Python Basics - Level 1 
 Chapter 4 Functions - pg 45-54

Lesson Objectives

 - learn the structure of functions
 - write your own functions
 - create a program using functions




Starter
Try typing the following into Python Interactive mode;

Press Return twice, then type count(10) - What happens?  - see pg 46

Main
A function is a piece of code that performs a specific task.
You already know some pre-built functions, such as print()

Red Task
Create a function that produces the times table. Remember to start by defining the function and giving an argument.


 

 Use pg 46 to help you if you get stuck


~~~Evidence~~~
1. Create a program that will print out the times table for any specified number 
- print it, stick it in your book and write a note to explain the structure of the function


Orange Task
Make your program a little more complex by adding a second argument that will allow the user to decide how far through the tables to go:

 See pg 56



~~~Evidence~~~ 
1. Write a program using a second argument 
 - print it, stick it in your book and write a note to explain why it is better than your first program today


Green Task
Copy out the code for the number guessing game on pg51. 
Run it to check that it works.

ExtensionTry Ideas 1 to 4 on pg 53 - 54
  




Blog Post (to finish for hwk)
Add the following notes/code snippets to your  blog entitled
 'The structure of a 
function' 

Plenary
Further reading:
 - http://learnpythonthehardway.org/book/ex19.html
 - http://usingpython.com/python-functions/

Homeowrk
Spend at leasst 30 minutes working on Code Academy - http://www.codecademy.com/learn

Monday, 5 January 2015

Autumn Term - Blog Review

Lesson Objectives
 - Review your Computer Science Blog for the Autumn Term


Starter

Look at the Computer Science Blog Post - Autumn Term checklist:


Main

1. Log in to your own blog and tick off posts you have completed, including tasks set.
2. Add posts/content for any items that are not yet on your blog.
3. Check the list again
4. Ask a friend to look at your blog and your list just to double check that you have included all work required.


Plenary

Make a note in your planner of any work still to be uploaded to your blog.


Extension

Add your own additional notes/videos/animations/images of the topics covered so far or any links to related news articles that you have come across.

Homework

Ensure your blog is up to date by Monday 12th January.