You are on page 1of 7

RATIONALE

In the Philippines, the speed limit for motorcycles on highways is typically set at 60-80 km/h.
This is based on the principle that the faster a vehicle is traveling, the greater the potential for a
severe accident or collision. Therefore, setting a speed limit helps to reduce the risk of such
incidents occurring. The calculation of motorcycle speed on highways in the Philippines involves
measuring the distance traveled by the motorcycle and the time it took to travel that distance.
This can be done using various methods, such as radar or GPS technology. The formula for
calculating speed is distance traveled divided by time taken, or (Speed = d/t).
It's important to note that while speed limits are in place to promote safety, it's also important for
motorcycle riders to be aware of their own capabilities and the conditions of the road. Riders
should always use caution and adjust their speed accordingly, especially in adverse weather
conditions or heavy traffic.
Additionally, it's important for motorcycle riders to follow traffic laws and obey posted speed
limit signs to avoid getting ticketed or risking their own safety and the safety of other drivers on
the road.

1
ALGORITHM
Step 1: Start.
Step 2: Declare the variables of d, t, Speed and continue_loop.
Step 3: Read the values d and t.
Step 4: Divide d by t and assign the result to Speed (Speed = d/t).
Step 6: Evaluate if the speed is within the range of 60-80 kph.
Step 7: If Yes, categorize it as minimum, normal or maximum based on the range of speed.
Step 5: Display the speed and the equivalent category.
Step 8: Prompt the user to enter 1 to continue or 2 to stop, assign the value to continue loop
Step 9: If continue_loop equals 1, repeat from step 2.
Step 10: If continue_loop equals 2.
Step 11: Exit.

2
FLOWCHART
Start

Distance = 0 , time = 0,

Speed = 0 , continue_loop = 0

Read values d and t

Speed = d/t

Display Speed

Yes While Speed is within No


60kph-80kph?

Display You’re
if Speed Yes
Display Minimum in Danger
>= 60kph
Speed Limit
No

elif Speed Yes


Display Normal
>= 70kph Speed Limit
No

Display Maximum
Speed Limit
I
if continue_loop = 1,
Yes
if stop continue_loop =
2
i
No
3

Stop
PSEUDO CODE
1. Begin
2. Initialize variables d, t, Speed, continue_loop
3. Read values d and t
4. Calculate Speed = d/t
5. Print Speed
6. Evaluate Speed is within 60kph-80kph
7. If yes, categorized Speed as minimum, normal, maximum based on the range speed
8. Prompt user to enter 1 to continue or 2 to stop
9. If continue_loop = 1, repeat step 2
10. Else continue_loop = 2
11. End

4
SOURCE CODE

5
SAMPLE OUTPUT

6
DOCUMENTATION

You might also like