--
You received this message because you are subscribed to the Google Groups "Discussion forum for Computational Thinking" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cs1001-discus...@nptel.iitm.ac.in.
To view this discussion on the web visit https://groups.google.com/a/nptel.iitm.ac.in/d/msgid/cs1001-discuss/6fd27e57-0ce0-40d3-ad62-558826e37e10n%40nptel.iitm.ac.in.
1 Procedure doCounting
2 A=0, B=0; C=0
3 P = False, Q = False
4 while (Table 1 has more rows) {
5 Read the first row X in Table 1
6 If (X.PartOfSpeech == "Pronoun" and Q) {
7 B = B+X.LetterCount
8 }
9 If (X.PartOfSpeech == "Noun") {
10 if (P) {
11 C = C+X.LetterCount
12 }
13 P = True
14 }
15 else {
16 P = False
17 }
18 Q = True
19 if (X. Word ends with a full stop) {
20 A = A+X.LetterCount
21 Q = False
22 }
23 Move X to Table 2
24 }
25 return ([A, B, C])
26 End doCounting