Professional Documents
Culture Documents
Sample datasets
Classroom Dataset –
Words dataset
• The card carries the following fields:
• Unique id no: values 0 to 3 in the cards above
• The word itself
• Part of speech or word category: Pronoun, Verb, Noun
• Letter count: 2, 3, 6 and 7 respectively for the cards above.
Initialization - The steps involved to setup the required context for the iterator to function is collectively
called initialisation.
Flowcharts
The step-wise description of the iterator that we saw in the previous section can be
visualized nicely using a diagram called a flowchart.
Basic datatypes –
Records and list
Process in words –
Step 0 Start
Step 1 Initialize Count to 0
Step 2 Check cards in Pile 1
Step 3 If no more cards, go Step 8
Step 4 Pick a card X from Pile 1
Step 5 Move X to Pile 2
Step 6 Increment Count
Step 7 Go back to Step 2
Step 8 End
Advantages
• Visual representation of computation
• Easy to understand
Disadvantages
• Size: Complex processes generate large flowcharts
• Collaboration: Sharing pictures in editable format
• Versions: Compare changes between flowcharts
o Start
o Count = 0
o More cards
o in Pile 1?
o Pick a card
o X from Pile 1
o Move X to Pile 2
o Increment
While condition - The while construct consists of a block of code and a condition/expression.