You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Discussion forum for Computational Thinking
Dear Team,
Just had a doubt in this question, as count does not get reassigned to zero after every iteration, the answer should be 10, considering there are 10 cards that match the criteria. My understanding is that "count" can take the value 1 (that is card found) if count is reassigned to 0 after every iteration.
Kindly clarify
Laxmi Priya Kasi
unread,
Oct 26, 2020, 12:47:46 AM10/26/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Discussion forum for Computational Thinking, Kaushik Chandrasekhar
Same doubt. Please Clarify
Computational Thinking Support 2
unread,
Oct 26, 2020, 6:29:33 AM10/26/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Discussion forum for Computational Thinking, Laxmi Priya Kasi, Kaushik Chandrasekhar
There are 10 cards that satisfy the condition for the "Correct card". The variable found becomes true right after the first "correct card" is encountered. Along with setting found to true, the variable count is incremented by 1. The moment found becomes true, the iteration terminates. So at the end of the execution, the variable count stores the value 1.
Regards,
Karthik
Laxmi Priya Kasi
unread,
Oct 26, 2020, 10:38:57 PM10/26/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Discussion forum for Computational Thinking, ct-su...@onlinedegree.iitm.ac.in, Laxmi Priya Kasi, Kaushik Chandrasekhar