Wednesday, October 27, 2010

Scratch controlls


Today i learned about arow key movement, i was able to move my sprite with the arow keys and draw a picture, the picture couldnt be circular though.

Wednesday, October 20, 2010

simple flowcharts


this is my flow chart how to negotiate traffic light as u drive down the street



The first flow chart is showing the testing of the temperature. It has good aspects of a flow chart. It realy shows weather the temp is above or below freezing.






The second flow chart is turning on a led Light

Tuesday, October 12, 2010

Computer algorithms

1. Algorithms

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

An outline of a program, written in a form that can easily be converted into real programming statements. For example, the pseudocode for a bubble sort routine might be written:



while not at end of list
compare adjacent elements
if second is greater than first
switch them
get next two elements
if elements were switched
repeat for entire list


Pseudocode cannot be compiled nor executed, and there are no real formatting or syntax rules. It is simply one step - an important one - in producing the final code. The benefit of pseudocode is that it enables the programmer to concentrate on the algorithms without worrying about all the syntactic details of a particular programming language. In fact, you can write pseudocode without even knowing


3. Machine Language

The lowest-level programming language (except for computers that utilize programmable microcode) Machine languages are the only languages understood by computers. While easily understood by computers, machine languages are almost impossible for humans to use because they consist entirely of numbers. Programmers, therefore, use either a high-level programming language or an assembly language. An assembly language contains the same instructions as a machine language, but the instructions and variables have names instead of being just numbers.

4. High Level Computer Language

Programs written in high-level languages are translated into assembly language or machine language by a compiler. Assembly language programs are translated into machine language by a program called an assembler.

Every CPU has its own unique machine language. Programs must be rewritten or recompiled, therefore, to run on different types of computers.

5. Flowchart

a diagram of the sequence of operations in a computer program or an accounting system

6. Sequence

The typical features of a telephone call are as follows: It begins an opening section featuring a hello or identification of the answering party. This is followed by a hello and identification of the calling party, with an exchange of how are you. Then the first topic is announced, followed by topic closing and shifts to (preferably) related topics. This is followed by a closing section consisting of elements like passing turns of okay, an identification of the type of call [Well, I just wanted to call and …], more passing turns, and an exchange of good-byes.

7. Selection

A carefully chosen or representative collection of people or things

8. Repetition

the act of repeating; repeated action, performance, production, or presentation.

1. Opening a door and entering a room.
  • walk straight toward the door
  • stop half a mitre from the door
  • reach hand out then grab the door knob
  • Turn clockwise then push
  • walk and push door at the same time
  • if door fully then open enter room
2. Negotiating traffic lights as you drive down a street.
  • Approach traffic light
  • Check color of light
  • If the light is green then continue
  • If the light is red then stop
  • If the light is orange then slow down