mock test docounting question

111 views
Skip to first unread message

Diyanshi Bhatt

unread,
Nov 15, 2020, 7:08:18 AM11/15/20
to Discussion forum for Computational Thinking
In this question what P and Q represent ? and how to use it?

DHARMA TEJA GODUMALA

unread,
Nov 15, 2020, 11:16:24 AM11/15/20
to Discussion forum for Computational Thinking, diyanshi...@gmail.com

Question 3.
We initialized P= False and Q=False initially 
If (X.parts of speech== Pronoun and Q.) 
here in the above condition if Q is false it won't get executed.
Every Word ending with Full stop will go to last if loop and returns the Q=False.
So Every sentence beginning with pronoun will won,t get executed as Q=False for first word in the sentence. 
And for all the other conditions other than the first word in the sentence the Q will be True.

Question 4,
P will be only True when the before word is Noun .
If it is noun and P=True then only the C count will be increased otherwise it won't get executed.
Example 
So if there are  consecutive nouns It Was Monday morning. 
Monday is noun , It will enter in IF loop of Noun and as before word is verb P will be false so 'C' count wont get increased.
Morning is Noun, It will enter In If loop of Noun and as before word is noun P will be True So 'C' count will get increased.

Remember for condition will check True or false and even we can assign some variables as True or False
Example : If (A>30)  true then only we enter that loop if A=10 then we can't enter that loop as 10<30 is False . If A=40 then we will enter the as 40>30 is True.
Hope it helps you 

DHARMA TEJA GODUMALA

unread,
Nov 16, 2020, 1:57:15 PM11/16/20
to Discussion forum for Computational Thinking, DHARMA TEJA GODUMALA, diyanshi...@gmail.com
Sorry a small correction from my side
In the above If is Not a loop ,
I frequently mentioned it as loop which is wrong,
if is a condition statement please correct my wording mentioned above. Remaining is fine.
Reply all
Reply to author
Forward
0 new messages