Friday 24 October 2014

Text files for Code Puzzle

7y6 Scratch Intro

Main -

Open up a new ‘Scratch' programme.

Students are to create a game that enables there character to:

Move by following the mouse

collect points for good items

lose points for bad items


SEARCH SCRATCH TUTORIALS ON GOOGLE TO HELP.



Plenary:


Play and peer assess another persons game, writing two stars and a wish on a post it note.


Make final adjustments before saving.

Thursday 23 October 2014

Language Libraries


Iteration

Iteration in computing is the repetition of a block of statements within a computer program. It can be used both as a general term, synonymous with repetition, and to describe a specific form of repetition with a mutable state.
When used in the first sense, recursion is an example of iteration, but typically using a recursive notation, which is typically not the case for iteration.
However, when used in the second (more restricted) sense, iteration describes the style of programming used in imperative programming languages. This contrasts with recursion, which has a more declarative approach.
Here is an example of iteration relying on destructive assignment, in imperative pseudocode:
a = 0
for i from 1 to 3        // loop three times
{
  a = a + i              // add the current value of i to a
}
print a                  // the number 6 is printed (0 + 1; 1 + 2; 3 + 3)
In this program fragment, the value of the variable i changes over time, taking the values 1, 2 and 3. This changing value—or mutable state—is characteristic of iteration.
Iteration can be approximated using recursive techniques in functional programming languages. The following example is inScheme. Note that the following is recursive (a special case of iteration) because the definition of "how to iterate", the iter function, calls itself in order to solve the problem instance. Specifically it uses tail recursion so it does not use large amounts of stack space.
(let iterate ((i 1) (a 0))
  (if (<= i 3)
    (iterate (+ i 1) (+ a i))
    (display a)))
An iterator is an object that provides iteration as a generic service, allowing iteration to be done in the same way for a range of different data structures. Conversely, an iteratee is an abstraction which accepts or rejects data during an iteration process (controlled externally by an enumerator - so unlike with code that uses iterators, the iteratee code is not "in charge" of the iteration process).
Iteration is also performed using a worksheet, or by using solver or goal seek functions available in Excel. Many implicit equations like the Colebrook equation can be solved in the convenience of a worksheet by designing suitable calculation algorithms.[3]
Many of the engineering problems like solving Colebrook equations reaches 8-digit accuracy in as small as 12 iterations and a maximum of 100 iterations is sufficient to reach a 15-digit accurate result .

Peripherals

11N5 Cover finish On a Mission the 3D Characters

If you need to finish anything with your on a mission work please do so it has to be finally marked over half term.

Otherwise working on 3D Characters from Heroes and Villians


Colour nets sent to me last lesson are in your draw folders still with Mrs Palmer if you can get them please.

Also ask her for the Python books from computer science class thanks

11M5 Cover

Carry on linking everything to do with your game up use the trackers and ensure it is all ready for me to mark over half term.


On a mission links are here

Tuesday 21 October 2014

Logic gates game

The "Gates of logic" is a mix of platform and a puzzle game. Player has to run across the 15 levels, jumping on platforms, avoiding sharp spikes etc. But that's not everything - the most important part is the puzzle part. On every level Player finds set of gates, inputs and outputs on the walls, connected with each other with wires. Some outputs control forcefields, other elevators, and some are powering the level exit. They all operate in binary system, controlled by laws of logic. Using gates such as AND, OR etc. player has to achieve desired state on the output in order to advance.


Lists










Monday 20 October 2014

3D CHARACTERS

Heroes and Villains


Two character designs will be printed on special cereal packs so they can be cut out and assembled to make 3D freestanding characters.

You must produce designs for two 3D characters, one hero and one villain.
Product Produce a design for each character.
Each design must:
  • only use elements from primary sources
  • be created using only vector tools
  • be a single net that folds to make the character
  • fit on one sheet of A4
  • include fold and cut lines, and areas to be glued
  • include clear instructions on how each character should be assembled.
Evidence Produce photographs showing your finished characters from different angles. To do this, you must print your designs in colour, cut them out and assemble them.

What is an Algorithm

Friday 17 October 2014

Winners Take All Cover Period 5 11P6

External Code Sources



Year 7 Cover Flowchart Instructions Lesson 8


Every pupil should be able to identify simple flowchart symbols. Most pupils will then be able to apply these symbols to construct a running flowchart system. Some will take this flowchart and refine its efficiency.


STARTER:
Ask students to access 8.1Tangram file (web version here: Tangram)
http://www.mathplayground.com/NGLogic/tangram.swf) or display on the board and discuss
as a class.

Working in pairs, or asking a volunteer, students should have a go at completing the tangram puzzles. 

One student should be the ‘computer’ while the other should be the ‘programmer’.

The role of the ‘computer’ is to follow the exact instructions of the ‘programmer’ who should
use only words to explain how to complete the puzzle (no pointing etc.)

Explain the importance of clear, sequential instructions in completing a task, and link to how
a computer understands instructions


DEVELOPMENT:

 Look at the symbols on the 8.2Flowchart Symbols file. Flowchart Symbols Discuss the final slide with pupils – what could be missing (a decision about milk / sugar etc…)

 Groups: hand out 8.3 Planning Sheet Planning Sheet and ask students to plan a flowchart for a zebra crossing. They will need one planning sheet each for the next activity. Start them off on the board

 Differentiation – lower ability pupils will need much more support and you may need to
show them and discuss and ask pupils to ‘act it out’ – rather than they do it themselves.

 Open Flowol and show (or ask pupil to help with remote mouse etc..) how to use the
tools and mimics and equate to their planning sheet. Ask students to use their completed
planning sheet to create and test their flowchart.

 Differentiation – lower ability pupils to copy and test the example zebra crossing mimic.

 Students take a screenshot of their final flowchart, put into Word

PLENARY:
Ask a volunteer to be the ‘computer’ in a similar way to the starter and ask them to follow
the instructions of a ‘programmer’ to collect an object in the room.





Thursday 16 October 2014

Random Facts Starter

Look for random facts on loads of different topics 

Find three you find interesting and snip onto your Blog

Code Breaking



So how good are you at code breaking? Here is a code crossword. No clues just the
code to break. We’ve given you a few letters to start. The key is at the top. All letters of
the alphabet appear in the key and grid…but which is which letter? Work out the code
and it will reveal one of the greatest movie messages of all time….and to make it a bit
more fun, you have to answer the following questions about the grid:
1) Which lump of clay ran away because it wanted to have fun
2) What is the caffeine-loaded programming language?
3) What animal has a crush on you?
4) What explosive song did Debbie Harry of Blondie sing?

Info from the BBC

Click Here for PDF version

www.secretcodebreaker.com/




Wednesday 15 October 2014

Programming Technique

Programming Technique
Screenshot
Why I used this
How it relates to the user requirements
Use of variables



Use of inputs



Use of outputs



Use of assigning values



Use of sequences



Use of condition



Use of loops



Use of conditional loops (IF)



Use of Boolean operators (and or)



Use of strings (text)



Use of integer (number)



How to convert binary to hexadecimal and back again (very simple shortcut)

Hexadecimal is a base 16 numbering system used in computers. If you are using the basic calculator on a Windows computer, you can swap the view to programmer from standard and easily translate between binary, decimal and hex. That being said however, there may be times when you are not allowed to use the calculator (like when taking a certification exam) so you should know this shortcut.

Step 1: Know the hexadecimal numbers through 15. 0 through 9 are all the same as decimal but 10-15 are not, since you cannot have a two digit number in a single bit. 

10 - A
11 - B
12 - C
13 - D
14 - E
15 - F

So if someone says 10 in decimal, they would mean A in hex. If someone said 10 in binary, they would mean 2 since 2^0 is 0 plus 2^1 is 2, equaling 2. See my previous tutorial for decimal/binary help: Decimal to Binary and Back

Ok so now that you might be saying to yourself, "I thought we would go to 16 since it's a base 16 system". Remember that we are starting at 0, which means 0 is the 1st number, 1 is the 2nd, 2 is the 3rd and so on with 15 being the 16th number. So 0-15 is 16 numbers.

Step 2: Acquire your binary or hex number that you would like to convert. Lets pick a random binary number, say 11010001. If you refer to the tutorial above, you would know that the binary number is 209 in decimal but we want to go to hex. Break the binary number into groups of 4 starting from the right side to the left. The groups would be:

1101 0001

Step 3: Match the number of that group to the corresponding hex value. The group on the left hand side, 1101, is equal to 13 in decimal. If you refer to the hex chart above, you will see that 13 in decimal equals "D". So that group of 4 is D. The second group is 0001 or just plain 1. 1 is the same across each three numbering systems so that group would simply be 1.

Combine those two values and you have D1 which is the correct answer.

Now lets try a harder number. 1101011010001

Let's break it into groups of four again, starting from the right hand side and moving left. So we have (1) (1010) (1101) (0001). Notice that the final group only has 1 number in it. That's ok. Often times you will not have a binary number that is perfectly divisible by 4. Not to worry, if you'd like you can simply add leading 0's so the group would be (0001). Either way, it is 1.

So, the first group on the left, (1), is simply 1. The second group, (1010), is 10 (decimal) or A in hex. The third group, (1101), is 13 (decimal) or D in hex. The final group, (0001), is simply 1. Combine all those values together and you get 1AD1.

It is exceedingly simple and only requires the memorization of that chart above, 10-15 or A-F. The long way to convert a number to hex, say 272 (decimal) is more of a challenge. Like binary, hex is translated using powers. Instead of a base 2 for binary, it's a base 16. For the binary tutorial, we talked about the place values being 2^0, 2^1, 2^2, 2^3 and so on. For hex, simply substitute 2 for 16 so it would be 16^0, 16^1, 16^2, 16^3 and so on. 

So the first group, 16^0, would be 1 since anything to the 0 power is 1. The second group, 16^1, would be 16. The third group, 16^2, would be 256 since 16 x 16 is 256. The fourth group, 16^3, would be 4096 since 16 x 16 x 16 is 4096. As you can see the numbers get very large very quickly, which helps out a great deal in usable address space (for IPv6).

So using the number above, 272 in decimal, would be 110 in hex. We know this because 110 in hex is:



So in essence, you would be adding 1 group of 256 with a group of 16 and no groups of 1 which equals 272.

Say you have 4100 (decimal) and want to convert it to hex the long way. First, you can write out your place values, 16^0, 16^1, 16^2, 16^3. 16^4 would be 65,536 and since you do not have a group of 65,536 in 4100, there is no need to go to that place value. 16^3 is 4096 and you do have 1 group of 4096 in 4100 so you will use that place value. So put a 1 in the 4096 place value, since you have a group of 4096 in 4100. Then you have 4 left over. 

Go to your next place value of 16^2 or 256. Do you have a group of 256 in 4? No, so put a 0 in that place value. Next go to 16^1 or 16. Do you have a group of 16 in 4? No, so put a 0 in that place value. Next is 16^0 or 1. Do you have a group of 1 in 4? Yes, you have 4 so put 4. Now you are done. Combine the values you got and the hex number is 1004.

Gaming Videos

Found these on BBC Bitesize the top four videos are relevant for gaming unit.


Tuesday 14 October 2014

Data Structures


Variable
What it does
Why I have used it























Programming Techniques


  • Use of variables 
  • Use of inputs 
  • Use of outputs 
  • Use of assigning values 
  • Use of sequences (pretty much any block of code)
  • Use of condition (IF, broadcast and receiving broadcast)
  • Use of loops (Forever/repeated loop)
  • Use of conditional loops (IF)
  • Use of Boolean operators (and, or etc...)
  • Use of strings (text)
  • Use of integer (number)
  • Data structures (Rule)
  • Input validation & error Handling (IF then else)