Showing posts with label Algorithm. Show all posts
Showing posts with label Algorithm. Show all posts

Sunday, 26 February 2012

Individual Activity: Update Environment Variables (1 frame)



Individual Activity: Update Environment Variables (1 frame)


Inputs:
R, Y, T and X
Process:
Get R, Y, T and X’s Value
X= X + R
Y= Y +T
Outputs:
X and Y    

Steps:
Start
1 Get R Y T X
2 Set R Y T X 
3 If X > 5000 then Y = Y – 1000
4 If Y < 0 then Y and X = 0
5 Display End result
End   



  

Sunday, 19 February 2012

Flow Charts




Here are the flow Charts for Exercise 2 






Blog Task 1.5

1. Using the five step process, develop an algorithm for the following problem:

You want to estimate the number of hours it will take you to complete all of the levels in a new video game based on your past performance with other games.

Inputs 
How many hours our in the new games
total play time. 

How many hours has it taken you
in prevues games.

Processing    
Multiply the amount of the games play time and 
the hours of game time you have played in past games.

Outputs
Total hours it will take you. 

 1. Prompt user for hours of new game play time. 

2. Get hours of new game play time.  

3.  Prompt user for hours of past games play time. 

4.Get hours of past games play time.

5. Total Time = New game play time x hours of past game play time

6. Total number of hours 

Monday, 13 February 2012

Blog Task: Algorithm Development 1


1. Using the five step process, develop an algorithm for the following problem:

You need to know the cost of sending a parcel to someone. The price of sending the item will depend upon its weight. The postal service has a standard charge per kilo of item weight.   



Inputs: 
postal service kilo charge.
parcel weight. 

Processing:
Multiply postal service kilo charge by parcel weight
Outputs:
TotalCost


Start CalculateTotalCost 
1.Prompt user for the postal service kilo charge
  2. Get postal service kilo charge
  3.Prompt user for postal service kilo charge 
  4. Get postal service kilo charge
  5. TotalCost = postal service kilo charge x parcel weight
  6.  Display TotalCost
End 






What Is An Algorithm

A Computer Algorithm is a step by step equation that allows you to get or do what you want on your computer to do. The Algorithm can also be used in everyday life as well for very simple everyday things. An computer example would be to try and access pinball. 

1 Turn on computer 
2 Log in 
3 Open Start 
4 Click and select Pinball 
5 Play and done

Sites Used:
http://computer.howstuffworks.com/question717.htm 
http://en.wikipedia.org/wiki/Algorithm