{"id":88,"date":"2020-04-01T13:34:03","date_gmt":"2020-04-01T13:34:03","guid":{"rendered":"https:\/\/temp.ashkerala.com\/?p=88"},"modified":"2020-04-01T13:34:03","modified_gmt":"2020-04-01T13:34:03","slug":"pseudocode-standard","status":"publish","type":"post","link":"https:\/\/temp.ashkerala.com\/?p=88","title":{"rendered":"Pseudocode Standard"},"content":{"rendered":"<p style=\"text-align: justify;\">Pseudocode is a kind of structured english for describing algorithms. It allows the designer to focus on the logic of the algorithm without being distracted by details of language syntax.\u00a0 At the same time, the pseudocode needs to be complete.\u00a0 It describe the entire logic of the algorithm so that implementation becomes a rote mechanical task of translating line by line into source code.<\/p>\n<p> In general the vocabulary used in the pseudocode should be the vocabulary of the problem domain, not of the implementation domain.\u00a0 The pseudocode is a narrative for someone who knows the requirements (problem domain) and is trying to learn how the solution is organized.\u00a0 E.g.,<\/p>\n<p> \u00a0\u00a0\u00a0 Extract the next word from the line (good)<br \/> \u00a0\u00a0\u00a0 set word to get next token (poor)<\/p>\n<p> \u00a0\u00a0\u00a0 Append the file extension to the name (good)<br \/> \u00a0\u00a0\u00a0 name = name + extension (poor)<\/p>\n<p> \u00a0\u00a0\u00a0 FOR all the characters in the name (good)<br \/> \u00a0\u00a0\u00a0 FOR character = first to last (ok)<\/p>\n<p> Note that the logic must be decomposed to the level of a single loop or decision. Thus &#8220;Search the list and find the customer with highest balance&#8221; is too vague because it takes a loop AND a nested decision to implement it. It&#8217;s okay to use &#8220;Find&#8221; or &#8220;Lookup&#8221; if there&#8217;s a predefined function for it such as String.indexOf().<\/p>\n<p> Each textbook and each individual designer may have their own personal style of pseudocode. Pseudocode is not a rigorous notation, since it is read by other people, not by the computer. There is no universal &#8220;standard&#8221; for the industry, but for instructional purposes it is helpful if we all follow a similar style. The format below is recommended for expressing your solutions in our class.<\/p>\n<p> The &#8220;structured&#8221; part of pseudocode is a notation for representing six specific structured programming constructs:<strong> SEQUENCE, WHILE, IF-THEN-ELSE, REPEAT-UNTIL, FOR, and CASE.<\/strong> Each of these constructs can be embedded inside any other construct. These constructs represent the logic, or flow of control in an algorithm.<\/p>\n<p> It has been proven that three basic constructs for flow of control are sufficient to implement any &#8220;proper&#8221; algorithm.<\/p>\n<p> \u00a0\u00a0\u00a0 <strong>SEQUENCE<\/strong> is a linear progression where one task is performed sequentially after another.<br \/> \u00a0\u00a0\u00a0 <strong>WHILE<\/strong> is a loop (repetition) with a simple conditional test at its beginning.<br \/> \u00a0\u00a0\u00a0 <strong>IF-THEN-ELSE<\/strong> is a decision (selection) in which a choice is made between two alternative courses of action.<\/p>\n<p> Although these constructs are sufficient, it is often useful to include three more constructs:<br \/> \u00a0<br \/> \u00a0\u00a0\u00a0 <strong>REPEAT-UNTIL<\/strong> is a loop with a simple conditional test at the bottom.<br \/> \u00a0\u00a0\u00a0 <strong>CASE<\/strong> is a multiway branch (decision) based on the value of an expression. CASE is a generalization of IF-THEN-ELSE.<br \/> \u00a0\u00a0\u00a0 FOR is a &#8220;counting&#8221; loop.<\/p>\n<p> <strong>SEQUENCE<\/strong><\/p>\n<p> Sequential control is indicated by writing one action after another, each action on a line by itself, and all actions aligned with the same indent. The actions are performed in the sequence (top to bottom) that they are written.<\/p>\n<p> <strong>Example (non-computer)<\/strong><br \/> \u00a0\u00a0\u00a0 Brush teeth<br \/> \u00a0\u00a0\u00a0 Wash face<br \/> \u00a0\u00a0\u00a0 Comb hair<br \/> \u00a0\u00a0\u00a0 Smile in mirror<\/p>\n<p> <strong>Example<\/strong><br \/> \u00a0\u00a0\u00a0 READ height of rectangle<br \/> \u00a0\u00a0\u00a0 READ width of rectangle<br \/> \u00a0\u00a0\u00a0 COMPUTE area as height times width<\/p>\n<p> <strong>Common Action Keywords<\/strong><br \/> \u00a0\u00a0\u00a0 Several keywords are often used to indicate common input, output, and processing operations.<\/p>\n<p> <em>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Input: READ, OBTAIN, GET<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Output: PRINT, DISPLAY, SHOW<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Compute: COMPUTE, CALCULATE, DETERMINE<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Initialize: SET, INIT<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Add one: INCREMENT, BUMP<\/em><\/p>\n<p> <strong>IF-THEN-ELSE<\/strong><\/p>\n<p> Binary choice on a given Boolean condition is indicated by the use of four keywords: IF, THEN, ELSE, and ENDIF. The general form is:<\/p>\n<p> \u00a0\u00a0\u00a0 IF condition THEN<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 sequence 1<br \/> \u00a0\u00a0\u00a0 ELSE<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 sequence 2<br \/> \u00a0\u00a0\u00a0 ENDIF<\/p>\n<p> The ELSE keyword and &#8220;sequence 2&#8221; are optional. If the condition is true, sequence 1 is performed, otherwise sequence 2 is performed.<\/p>\n<p> <strong>Example<\/strong><br \/> \u00a0\u00a0\u00a0 IF HoursWorked &gt; NormalMax THEN<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Display overtime message<br \/> \u00a0\u00a0\u00a0 ELSE<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Display regular time message<br \/> \u00a0\u00a0\u00a0 ENDIF<\/p>\n<p> <strong>WHILE<\/strong><br \/> The WHILE construct is used to specify a loop with a test at the top. The beginning and ending of the loop are indicated by two keywords WHILE and ENDWHILE. The general form is:<\/p>\n<p> \u00a0\u00a0\u00a0 WHILE condition<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 sequence<br \/> \u00a0\u00a0\u00a0 ENDWHILE<\/p>\n<p> The loop is entered only if the condition is true. The &#8220;sequence&#8221; is performed for each iteration. At the conclusion of each iteration, the condition is evaluated and the loop continues as long as the condition is true.<\/p>\n<p> <strong>Example<\/strong><br \/> \u00a0\u00a0\u00a0 WHILE Population &lt; Limit<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Compute Population as Population + Births &#8211; Deaths<br \/> \u00a0\u00a0\u00a0 ENDWHILE<\/p>\n<p> <strong>Example<\/strong><\/p>\n<p> \u00a0\u00a0\u00a0 WHILE employee.type NOT EQUAL manager AND personCount &lt; numEmployees<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 INCREMENT personCount<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 CALL employeeList.getPerson with personCount RETURNING employee<br \/> \u00a0\u00a0\u00a0 ENDWHILE<\/p>\n<p> <strong>CASE<\/strong><\/p>\n<p> A CASE construct indicates a multiway branch based on conditions that are mutually exclusive. Four keywords, CASE, OF, OTHERS, and ENDCASE, and conditions are used to indicate the various alternatives. The general form is:<\/p>\n<p> <strong>\u00a0\u00a0\u00a0 CASE expression OF<\/strong><\/p>\n<p> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 condition 1 : sequence 1<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 condition 2 : sequence 2<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8230;<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 condition n : sequence n<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 OTHERS:<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 default sequence<br \/> \u00a0\u00a0\u00a0 ENDCASE<\/p>\n<p> \u00a0\u00a0\u00a0 The OTHERS clause with its default sequence is optional. Conditions are normally numbers or characters<\/p>\n<p> indicating the value of &#8220;expression&#8221;, but they can be English statements or some other notation that specifies the condition under which the given sequence is to be performed. A certain sequence may be associated with more than one condition.<\/p>\n<p> <strong>Example<\/strong><br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 CASE\u00a0 Title\u00a0 OF<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Mr\u00a0\u00a0\u00a0\u00a0\u00a0 : Print &#8220;Mister&#8221;<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Mrs\u00a0\u00a0\u00a0\u00a0 : Print &#8220;Missus&#8221;<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Miss\u00a0\u00a0\u00a0 : Print &#8220;Miss&#8221;<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Ms\u00a0\u00a0\u00a0\u00a0\u00a0 : Print &#8220;Mizz&#8221;<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Dr\u00a0\u00a0\u00a0\u00a0\u00a0 : Print &#8220;Doctor&#8221;<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ENDCASE<\/p>\n<p> <strong>Example<\/strong><br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 CASE\u00a0 grade\u00a0 OF<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 A\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 : points = 4<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 B\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 : points = 3<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 C\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 : points = 2<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 D\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 : points = 1<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 F\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 : points = 0<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ENDCASE<\/p>\n<p> <strong>REPEAT-UNTIL<\/strong><\/p>\n<p> This loop is similar to the WHILE loop except that the test is performed at the bottom of the loop instead of at the top. Two keywords, REPEAT and UNTIL are used. The general form is:<\/p>\n<p> \u00a0\u00a0\u00a0 REPEAT<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 sequence<br \/> \u00a0\u00a0\u00a0 UNTIL condition<\/p>\n<p> The &#8220;sequence&#8221; in this type of loop is always performed at least once, because the test is peformed after the sequence is executed. At the conclusion of each iteration, the condition is evaluated, and the loop repeats if the condition is false. The loop terminates when the condition becomes true.<\/p>\n<p style=\"text-align: justify;\"><strong>FOR<\/strong><\/p>\n<p> This loop is a specialized construct for iterating a specific number of times, often called a &#8220;counting&#8221; loop.\u00a0 Two keywords, FOR and ENDFOR are used. The general form is:<\/p>\n<p> \u00a0\u00a0\u00a0 FOR iteration bounds<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 sequence<br \/> \u00a0\u00a0\u00a0 ENDFOR<\/p>\n<p> In cases where the loop constraints can be obviously inferred it is best to describe the loop using problem domain vocabulary.<\/p>\n<p> <strong>Example<\/strong><br \/> \u00a0\u00a0\u00a0 FOR each month of the year (good)<br \/> \u00a0\u00a0\u00a0 FOR month = 1 to 12 (ok)<br \/> \u00a0\u00a0\u00a0 FOR each employee in the list (good)<br \/> \u00a0\u00a0\u00a0 FOR empno = 1 to listsize (ok)<\/p>\n<p> <strong>NESTED CONSTRUCTS<\/strong><\/p>\n<p> The constructs can be embedded within each other, and this is made clear by use of indenting. Nested constructs should be clearly indented from their surrounding constructs.<\/p>\n<p> <strong>Example<\/strong><br \/> \u00a0\u00a0\u00a0 SET total to zero<br \/> \u00a0\u00a0\u00a0 REPEAT<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 READ Temperature<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 IF Temperature &gt; Freezing THEN<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 INCREMENT total<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 END IF<br \/> \u00a0\u00a0\u00a0 UNTIL Temperature &lt; zero<br \/> \u00a0\u00a0\u00a0 Print total<\/p>\n<p> In the above example, the IF construct is nested within the REPEAT construct, and therefore is indented.<\/p>\n<p> <strong>INVOKING SUBPROCEDURES<\/strong><\/p>\n<p> Use the CALL keyword. For example:<br \/> \u00a0\u00a0\u00a0 CALL AvgAge with StudentAges<br \/> \u00a0\u00a0\u00a0 CALL Swap with CurrentItem and TargetItem<br \/> \u00a0\u00a0\u00a0 CALL Account.debit with CheckAmount<br \/> \u00a0\u00a0\u00a0 CALL getBalance RETURNING aBalance<br \/> \u00a0\u00a0\u00a0 CALL SquareRoot with orbitHeight RETURNING nominalOrbit<\/p>\n<p> <strong>EXCEPTION HANDLING<\/strong><br \/> \u00a0\u00a0\u00a0 BEGIN<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 statements<br \/> \u00a0\u00a0\u00a0 EXCEPTION<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 WHEN exception type<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 statements to handle exception<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 WHEN another exception type<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 statements to handle exception<br \/> \u00a0\u00a0\u00a0 END<\/p>\n<p> <strong>Sample Pseudocode<\/strong><br \/> <em><strong>&#8220;Adequate&#8221;<\/strong><\/em><\/p>\n<p> FOR X = 1 to 10<br \/> \u00a0\u00a0\u00a0 FOR Y = 1 to 10<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 IF gameBoard[X][Y] = 0<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Do nothing<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ELSE<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 CALL theCall(X, Y) (recursive method)<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 increment counter\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 END IF<br \/> \u00a0\u00a0\u00a0 END FOR<br \/> END FOR<\/p>\n<p> <em><strong>&#8220;Better&#8221;<\/strong><\/em><br \/> Set moveCount to 1<br \/> FOR each row on the board<br \/> \u00a0\u00a0\u00a0 FOR each column on the board<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 IF gameBoard position (row, column) is occupied THEN<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 CALL findAdjacentTiles with row, column<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 INCREMENT moveCount<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 END IF<br \/> \u00a0\u00a0\u00a0 END FOR<br \/> END FOR<\/p>\n<p> (Note: the logic is restructured to omit the &#8220;do nothing&#8221; clause)<\/p>\n<p> <em><strong>&#8220;Not So Good&#8221;<\/strong><\/em><\/p>\n<p> FOR all the number at the back of the array<br \/> \u00a0\u00a0\u00a0 SET Temp equal the addition of each number<br \/> \u00a0\u00a0\u00a0 IF &gt; 9 THEN<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 get the remainder of the number divided by 10 to that index<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 and carry the &#8220;1&#8221;<br \/> \u00a0\u00a0\u00a0 Decrement one<br \/> Do it again for numbers before the decimal<\/p>\n<p> <em><strong>&#8220;Good Enough (not perfect)&#8221;<\/strong><\/em><\/p>\n<p> SET Carry to 0<br \/> FOR each DigitPosition in Number from least significant to most significant<\/p>\n<p> \u00a0\u00a0\u00a0 COMPUTE Total as sum of FirstNum[DigitPosition] and SecondNum[DigitPosition] and Carry \u00a0<\/p>\n<p> \u00a0\u00a0\u00a0 IF Total &gt; 10 THEN<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 SET Carry to 1<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 SUBTRACT 10 from Total<br \/> \u00a0\u00a0\u00a0 ELSE<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 SET Carry to 0<br \/> \u00a0\u00a0\u00a0 END IF<br \/> \u00a0\u00a0\u00a0 STORE Total in Result[DigitPosition]<br \/> END LOOP \u00a0<br \/> IF Carry = 1 THEN<br \/> \u00a0\u00a0\u00a0 RAISE Overflow exception<br \/> END IF<\/p>\n<p> &#8220;Pretty Good&#8221;\u00a0 This example shows how pseudocode is written as comments in the source file. Note that the double slashes are indented.<\/p>\n<p> public boolean moveRobot (Robot aRobot)<br \/> {<br \/> \u00a0\u00a0\u00a0 \/\/IF robot has no obstacle in front THEN<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/ Call Move robot<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/ Add the move command to the command history<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/ RETURN true<br \/> \u00a0\u00a0\u00a0 \/\/ELSE<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/ RETURN false without moving the robot<br \/> \u00a0\u00a0\u00a0 \/\/END IF<br \/> }<\/p>\n<p> <strong>Example Java Implementation<\/strong><\/p>\n<p> \u00a0\u00a0\u00a0 source code statements are interleaved with pseudocode.<br \/> \u00a0\u00a0\u00a0 comments that correspond exactly to source code are removed during coding.<\/p>\n<p> public boolean moveRobot (Robot aRobot)<br \/> {<br \/> \u00a0\u00a0\u00a0 \/\/IF robot has no obstacle in front THEN<br \/> \u00a0\u00a0\u00a0 if (aRobot.isFrontClear())<br \/> \u00a0\u00a0\u00a0 {<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/ Call Move robot<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 aRobot.move();<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \/\/ Add the move command to the command history<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 cmdHistory.add(RobotAction.MOVE);<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 return true;<br \/> \u00a0\u00a0\u00a0 }<br \/> \u00a0\u00a0\u00a0 else \/\/ don&#8217;t move the robot<br \/> \u00a0\u00a0\u00a0 {<br \/> \u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 return false;<br \/> \u00a0\u00a0\u00a0 }\/\/END IF<br \/> }<br \/> \u00a0<br \/> <strong>\u00a0 Examples of vague pseudocode<\/strong><\/p>\n<p> Document History<br \/> Date \u00a0\u00a0 \u00a0Author \u00a0\u00a0 \u00a0Change<br \/> 12\/2\/03<br \/> \u00a0\u00a0 \u00a0JD<br \/> \u00a0\u00a0 \u00a0Added Exception Handling and more examples<br \/> 2\/21\/03 \u00a0\u00a0 \u00a0JD \u00a0\u00a0 \u00a0Added &#8220;problem domain vocabulary&#8221; paragraph.<br \/> Modified FOR loop explanation.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Pseudocode is a kind of structured english for describing algorithms. It allows the designer to focus on the logic of the algorithm without being distracted by details of language syntax.\u00a0 At the same time, the pseudocode needs to be complete.\u00a0 It describe the entire logic of the algorithm so that implementation becomes a rote mechanical&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[8],"tags":[],"class_list":["post-88","post","type-post","status-publish","format-standard","hentry","category-ugc-research"],"_links":{"self":[{"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=\/wp\/v2\/posts\/88","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=88"}],"version-history":[{"count":0,"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=\/wp\/v2\/posts\/88\/revisions"}],"wp:attachment":[{"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=88"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=88"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=88"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}