Friday, 31 January 2014

Introduction to Python

Introduction to Python


One key message this week is to look at the syllabus.  This outlines what you need to learn for the GCSE.  the syllabus is available from OCR's website, here.  The relavent information is located on pages 6-11 for your exam component.

This week we have had a look at the python language, and how we can start using it.  

Python can be downloaded to your computer at home for free from this site.  Be sure to check that you are using version 3, and that you check the system that you are working from.  

The documentation for python is located at docs.python.org.  This documentation is fantastic!  However learning programming involves a steep learning curve which we shall ascend carefully.  The language in the documentation is designed for programmers, it is a difficult attack for you now, but that is no reason to "dumb it down".  With a bit of perseverance, and a few questions you will get this in no time.

We wrote our first program in lessons this week.  You can find the program I wrote here.  

Github is great for sharing programs, and for editing other peoples code.  we will not use a lot of its functionality during the GCSE course, but if you continue programming in any way it will become invaluable.

Key notes

Functions

  • A function is declared using the def keyword. (short for define)
  • A function definition is an executable statement. 
  • The function definition does not execute the function body; 
  • this gets executed only when the function is called. 

Variables

  • A variable is a place in memory that can store a piece of data.
  • A variable is set up when a value is assigned to it using a single equals sign.
  • A variable can have any name which is not already defined as a built in keyword,or function.
  • A piece of data can be;
    • A string 
      • word = “hello class”
      • strings are text.  ie a collection of letters, numbers, and punctuation.
    • A number (integer or float)
      • number = 4 
      • number = 4.0
      • Numbers can have operations performed on them. as shown in the documenation.
    • A list
      • Things = [1,2,3,4,5,]
      • lists have operations on them, for examples see the documentation.

Key words

This week we have used a number of other key words in lessons.
  • Integer
    • A whole number (positive or negative)
  • Float
    • A number with a decimal point (positive or negative)
  • String
    • Text.
  • Floor
    • Rounded down number.
    • The opposite to the floor of a float is its ceiling (ceil).
  • Product 
    • Result when two numbers are multiplied.
  • Quotient
    • Result when two numbers are divided.



Thursday, 30 January 2014

Revision Notes 2 for year 11

Today we had a look at questions 5b - 7 on your mock exam.

Question 5b

This was an expansion on the use of binary and hex.  The question was asking you to remember the link between binary and hexadecimal.  The link is that a nibble of binary maps exactly to a digit in hex.  

A nibble is a four digit group in Binary (half a byte).

You should remember how to create this table.  The pattern is worth learning.
Binary Hexadecimal
0000 0
0001 1
0010 2
0011 3
0100 4
0101 5
0110 6
0111 7
1000 8
1001 9
1010 A
1011 B
1100 C
1101 D
1110 E
1111 F
Here is a rather long, but good explanation of the concept.

Why is it better?  Because if is easier to read for humans.

If you are asked to Explain something in an exam give two facts, or a fact and a reason.

Question 6

Question 6 was about databases, and logic.
What you are required to know - From the syllabus.
fig 1 - Specification relating to required database knowledge







Question 6 asked you to recall information about relational databases.  Key words that came up in today's discussion were "entity", Table, and "truth table" when dealing with logic symbols.

Here is a quick explanation from catcomputerteacher.

Question 7


Question 7 asked us to recall information relating to programming.  The key words in the question were selection, and iteration.  You should be able recognize these statements written in pseudo-code, or code.

This is explicitly required by the syllabus;

fig 2 - from syllabus.  it is important to learn the meanings of these key words.







Summary

We are making good progress!  I know that I need to plan a lesson on databases. As there were a lot of gaps in your knowledge there, but we are making good progress towards success.  There is no rush, feel free to ask questions in class, or in the comments.

Friday, 24 January 2014

Revision notes for year 11

Today we had a look at the first 5 questions from our mock test. This is a quick reminder of the main points that came up in discussion, and some extra resources to help you revise.

The mock exam is still under restriction from the exam board, hence I cannot link to it here.

Question 1.


When examiners create exams they anticipate students being nervous at the start of exams. The trick with questions like this one is to calm yourself and read it carefully. These types of questions need you to almost physically slow yourself down and to read carefully.  Also check carefully these questions at the end of the exam.  your nerves have gone by then, but you still may need these marks.

Question 2


Although the question asks for an answer, the examiner is after your working more than the actual answer.  This is true for most mathematical questions in computing. 
^ means to the power of

Facts to remember: 2^10 = 1024
1 kilobyte = 1024 bytes 
1 megabyte = 1024 kilobytes = 1024^2 bytes
1 gigabyte = 1024 megabytes = 1024^3 bytes
1 terabyte = 1024 gigabytes = 1024^4 bytes
1 petabyte = 1024 terabytes = 1024^5 bytes

We also discussed the ROM and RAM in a computer.

key differences:

  • ROM is smaller than RAM
  • ROM contains BIOS, 
  • ROM is non-volatile, RAM is Volatile.
  • ROM contains enough information to boot the computer and load an Operating system.  
  • RAM is the working memory of the computer.  It is the "what am I doing here and now?"
More information - Bitesize

Question 3

Question 3 relates to computer hardware, and in particular the Von-Neuman Architecture.

Good links to help:

We will do more about this later.

Question 4

This related again to the Von-Neuman architecture of a machine.  The key point in this question was the language used in the test.

If an exam asks you to state an answer, you simply write the answer down.  if a question asks you to describe a something you state it first, then justify your statement.

for example:

State a hardware improvement to help a blind person:
 - A braille keyboard
Describe a hardware improvement to help a blind person:
 - A braille keyboard would provide a familiar interface for blind people to use.

Question 5

This question related to number systems used with computers and other systems.  in particular converting between denary (base 10), and binary (base 2).  I have attached a couple of resources for the questions we went through today, but these are quite advanced, don't be afraid to ask!

resources:
We will have a couple of lessons relating to the "Von-Neumann" computing architecture, and binary numbers. We will go through some more of the mock next Friday.