A Doubt about Q53

258 views
Skip to first unread message

Dipak Patil

unread,
Dec 2, 2020, 9:40:40 AM12/2/20
to Discussion forum for Computational Thinking
Respected Sir, 
I have a small doubt about Q53 in which we have to find the errors in the code. As "A" variable is initialized in question and in the pseudo code on the first line "C" is used as variable. So this error is counted but on the line 5, "C" variable is incremented. Why this is not the error? 


Thank You,
Dipak PatilQ53.png   

Dipin Manmadhan

unread,
Dec 2, 2020, 10:21:38 AM12/2/20
to Discussion forum for Computational Thinking, dipakpa...@gmail.com
Actually, the error in the first line is not the use of 'C'. It is because C should be assigned as 0 there. not 1.
Since they used C consistency as the variable name in the entire pseudo-code, it's not an error.

But you could argue that the mistake in question created some ambiguity though.

Vishakh Agarwal

unread,
Dec 3, 2020, 4:17:51 AM12/3/20
to Discussion forum for Computational Thinking, dipakpa...@gmail.com
Even I considered the same thing and marked line 5 as an error...the question boldly mentions "A", and then C is used as a counter which is definitely an error.
 I was getting a whopping 50.....but these ambiguities always intrude in between ......and now my score is relegated to 45 because it was a 5 marks question and no step marks would be given if any marked option is found to be incorrect.

Z0rba

unread,
Dec 4, 2020, 7:04:06 AM12/4/20
to Discussion forum for Computational Thinking, dipakpa...@gmail.com
In the question it is only stated that A is storing the value of the output stored by computation. However the variable A is not declared here that does not imply that variable A and C are related, maybe A is declared in later stages where it is assigned the value taken on by the variable C. So, likewise actual error in line 1 as rightfully stated by Dipin, is it's assignment to 1 and not 0 and line 5 is correct evidently error in line 11 also being true. A does store the value but relationship between A and C is not given in the question so using C is not wrong! Cheers!

On Wednesday, December 2, 2020 at 8:10:40 PM UTC+5:30 dipakpa...@gmail.com wrote:

Mayur Shroff

unread,
Dec 4, 2020, 7:18:04 AM12/4/20
to Z0rba, cs1001-...@nptel.iitm.ac.in
Dear zorba,
The question states that "The following pseudocode is executed using the "Words" table. At the end of the execution, A
captures" and the pseudocode ends with the end statement written in the code. There is nowhere mentioned in the code that value of C variable is stored in A at the end of procedure.  Neither there is any mention of variable A in the code.You cannot assume anything as you wish in the code.  Please don't give replies like"At a later stage maybe". If you have something concrete then only reply to the queries.

--
You received this message because you are subscribed to a topic in the Google Groups "Discussion forum for Computational Thinking" group.
To unsubscribe from this topic, visit https://groups.google.com/a/nptel.iitm.ac.in/d/topic/cs1001-discuss/8Y2F2kRcOn8/unsubscribe.
To unsubscribe from this group and all its topics, 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/07fb89ca-7cd6-46e9-98c6-1bf9d863f81fn%40nptel.iitm.ac.in.
Reply all
Reply to author
Forward
0 new messages