Session 6
Saturday, 28 October 2017
It's two weeks away from mid exam, so miss Yanfi gives us exercise for our mid exam. After we do the exercise, Miss Yanfi collects it to see what we understand and what we don't understand.
In this session, we learned about selective statement and iterative statement.
Selective statement provides the means of choosing between two or more paths of execution. In example, if then else statement. If the then reserved word or some other syntactic marker is not used to introduce the then clause, the control expression is placed in parenthesis. Selectors can be nested. There are multiple-way selection statement that allow selection of one of any number of statements or statement groups.
Iterative statements are the repeated execution of a statement or compound statement is accomplished either by iteration or recursion. Counter controlled loops are a counting iterative statement has a loop variable, and a means of specifying the initial and terminal, and stepwise values. In logically-controlled loops, repetition control is based on boolean expression. Sometimes it is convenient for the programmers to decide a location for loop control (other than top or bottom of the loop) using user-located loop control mechanisms.
That's all for this session.
No comments:
Post a Comment