322,532 views
25 votes
25 votes
Write a Pseudo code for average speed

User Alfredocambera
by
3.0k points

1 Answer

19 votes
19 votes

Answer:

SEQUENCE represents linear tasks sequentially performed one after the other.

WHILE a loop with a condition at its beginning.

REPEAT-UNTIL a loop with a condition at the bottom.

FOR another way of looping.

IF-THEN-ELSE a conditional statement changing the flow of the algorithm.

CASE the generalization form of IF-THEN-ELSE

Explanation:

Always capitalize the initial word (often one of the main 6 constructs).

Have only one statement per line.

Indent to show hierarchy, improve readability, and show nested constructs.

Always end multiline sections using any of the END keywords (ENDIF, ENDWHILE, etc.).

Keep your statements programming language independent.

Use the naming domain of the problem, not that of the implementation. E.g., “Append the last name to the first name” instead of “name = first+ last.”

Keep it simple, concise, and readable.

User Thanya
by
2.8k points