8. Suprise Button
Tuesday, October 26, 2010
Friday, October 22, 2010
Scratch Examples...
I did 8 scratch examples, through those examples I learnt a lot about Scratch and how to use it. I learnt how to make animations on scratch, I learnt a lot about how to move the characters, how to change costumes and add sound. I also leant about the things we can do using Scratch like make animations, games etc. After doing those examples I am now clear on how to use scratch and make a good game.
Thursday, October 21, 2010
Control structures - step 3
What do you think the sequence of blocks below will achieve? Build it and see. Remember, you activate the sequence by double clicking it and don’t forget to stop your algorithm by hitting the red button:
The sequence if block will give us a choice while the forever block will allow us to repeat the process.After building it in scratch, the cartoon character moved where you clicked your mouse.
The forever block will allow us to repeat the process and the if block will give us a choice. After building this on scratch what happeend was that the cartoon character went where ever i pointed at the mouse, and with the second bit after touching the cartoon character it made a sound 'got you'.
Monday, October 18, 2010
Thursday, October 14, 2010
Flowcharts...
DESCRIBING THE FLOWCHARTS:
- Start
- Read Temperature
- If it is less than 32 than print 'below freezing'
- If it is more than 32 than print 'above freezing'.
- After all that end.
It is talking about One Second Response to a Switch.
- Start
- Then check if the switch is on.
- If it is not on go back to start.
- If it is on then turn the LED on.
- Then start timer.
- Check if 1 second is expired.
- If it hasnt then go back to start timer.
- If it has then turn the LED off.
- After that reset the timer.
- After that is done end.
Tuesday, October 12, 2010
Computer Algorithms
Definitions:
1. Algorithms:
A step by step problem solving procedure, also an established recursive computiational procedure for solving a problem in a finite number of steps.
2. Pseudocode:
The steps we would take to solve a problem.
3. Machine Language:
It is a system of instructions and data effected directly by a computer's central processing unit.
4. High Level Computer Language:
A programming language with strong abstraction from the details of the computer. It can be read by multiple computers and operating systems.
5. Flowchart:
It is a type of diagram that represents an algorithm or process, showing the steps as boces of various kinds and their order is connected by using arrows. It is helpful to solve programming problems if it is put in a flowchart.
All of these relate to the control structure of a program.
6. Sequence:
Where you do the items in the sequence listed.
7. Selection:
A control function that allows us to have multiple options.
8. Repetition:
That allows some lines of code to be executed many times.
Opening a door and entering a room:
1. Algorithms:
A step by step problem solving procedure, also an established recursive computiational procedure for solving a problem in a finite number of steps.
2. Pseudocode:
The steps we would take to solve a problem.
3. Machine Language:
It is a system of instructions and data effected directly by a computer's central processing unit.
4. High Level Computer Language:
A programming language with strong abstraction from the details of the computer. It can be read by multiple computers and operating systems.
5. Flowchart:
It is a type of diagram that represents an algorithm or process, showing the steps as boces of various kinds and their order is connected by using arrows. It is helpful to solve programming problems if it is put in a flowchart.
All of these relate to the control structure of a program.
6. Sequence:
Where you do the items in the sequence listed.
7. Selection:
A control function that allows us to have multiple options.
8. Repetition:
That allows some lines of code to be executed many times.
Opening a door and entering a room:
- Turn the door knob and walk in.
- If door knob doesnt open easily try to push or pull harder maybe the door is jammed.
- If it still doesnt open check if the door is locked.
- Look for a key to open the door.
- After turning the key if the door still doesnt open maybe the door knob is broken then call locksmith for help.
- If the light is green just drive pass it.
- If it just turned amber, drive pass it.
- If it has been amber for a long time slow down or stop because it may turn red.
- If the light is red then stop and wait for it to turn green.
Subscribe to:
Posts (Atom)