Today i had an attempt on scratch. I am starting to get used to how to use it and it is very interesting. Below is an image which i print screened to show what i had done on scratch. The stick figure i created moved and sound came. This is only a simple and plain image i had created.
Tuesday, October 26, 2010
Step Two - Scratch and Programming Control Structures
Above is the prinstscreen of the "IF" and "FOREVER" controls i experiemented for the last section in part two.
Friday, October 22, 2010
Step two - Flowcharts
1. For each of the flowcharts below describe in words what you think they will do.
a)
The flowchart above describes how temperature is shown. Once the termometer is turned on, you read the temp and if the temp is below 32 degrees celcius it will print "Below Freezing" if it is not below 32 degrees celcius it will print "Above Freezing" and then it will end.
b)
The flowchart above describes what the responses are when a light is switched on. Once you press start, if the switch is on then the LED will turn on, however if the switch is not on it will keep asking whether the switch is on. Once it is on, the LED will turn on and the timer would start. If one second hasn't expired the timer will keep asking if it's started, however when it starts the LED will turn off and the timer will reset. The process will be ended here.
2. Convert one of the algorithms you have created in the previous task into a flowchart, e.g. opening a door, moving through a traffic light.
Opening a door -
Opening a door -
Wednesday, October 20, 2010
Step two - Computer Algorithms
DEFINITIONS
1. AlgorithmsIn its most general sense, an algorithm is any set of detailed instructions which results in a predictable end-state from a known beginning. Algorithms are only as good as the instructions given, however, and the result will be incorrect if the algorithm is not properly defined.
2. Pseudocode
Pseudocode is a compact and informal high-level description of a computer programming algorithm that uses the structural conventions of a programming language, but is intended for human reading rather than machine reading.
3. Machine Language
Machine code or machine language is a system of instructions and data executed directly by a computer's central processing unit.
4. High Level Computer Language
A high-level programming language is a programming language with strong abstraction from the details of the computer. In comparison to low-level programming languages, it may use natural language elements, be easier to use, or be more portable across platforms. Such languages hide the details of CPU operations such as memory access models and management of scope.
5. Flowchart
A flowchart is a type of diagram, that represents an algorithmm or process, showing the steps as boxes of various kinds, and their order by connecting these with arrows. This diagrammatic representation can give a step-by-step solution to a given problem. Data is represented in these boxes, and arrows connecting them represent flow / direction of flow of data.
6. Sequence
In mathematics, a sequence is an ordered list of objects (or events). Like a set, it contains members (also called elements or terms), and the number of terms (possibly infinite) is called the length of the sequence. Unlike a set, order matters, and exactly the same elements can appear multiple times at different positions in the sequence. A sequence is a discrete function
7. Selection
The act of choosing or selecting. ('If' or 'Then')
8. Repition
The act or process of repeating a set or sequence of instructions.
ALGORITHMS
a) Opening a Door and Entering a Room
1. Position yourself in front of the door
2. Lift your hand slightly
3. Rest your hand on the door knob
4. Twist in a clockwise direction and pull
5. Release the door knob
6. Walk straight forward through the door
7. Enter the room
b) Traffic Lights Algorithm
1. Approach lights
2. Check colour of light
3. If the light is green, then continue driving
4. If the light is red, then prepare to stop
5. If the light is orange, then slow down
Subscribe to:
Comments (Atom)




