I CAN'T UNDERSTAND THE CODE

120 views
Skip to first unread message

Kunal -

unread,
Nov 13, 2020, 10:03:25 AM11/13/20
to Discussion forum for Computational Thinking
A.png

Kunal -

unread,
Nov 13, 2020, 10:04:40 AM11/13/20
to Discussion forum for Computational Thinking, Kunal -
IN IF STATEMENT WE GENERALLY WRITE CONDITION BUT WHAT IS THE CONDITION HERE

On Friday, 13 November 2020 at 20:33:25 UTC+5:30 Kunal - wrote:
A.png

AC

unread,
Nov 13, 2020, 10:53:41 AM11/13/20
to Discussion forum for Computational Thinking, Kunal -

Ranjit John

unread,
Nov 13, 2020, 1:52:22 PM11/13/20
to Kunal -, Discussion forum for Computational Thinking
If (P) means 'If (P = = True)'
Same way Q, means 'If (Q == True)'




--
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/30ec2162-49e5-4570-bd8d-701f4397eedfn%40nptel.iitm.ac.in.

Computational Thinking Support 2

unread,
Nov 16, 2020, 12:57:12 AM11/16/20
to Discussion forum for Computational Thinking, Ranjit John, Discussion forum for Computational Thinking, Kunal -
Yes what Ranjith told is correct, The if conditions checks for  Boolean values  "True" or "False". Here already P is having values either True or False, so we may not need to explicitly check If (P == True).

Regards,
Nijin
IITM Online Degree Programme.

Cacklo Uncle

unread,
Nov 16, 2020, 1:00:02 AM11/16/20
to Discussion forum for Computational Thinking, ct-su...@onlinedegree.iitm.ac.in, Ranjit John, Discussion forum for Computational Thinking, Kunal -
But it is not written anywhere what P and Q represent. I might seem dumb asking that question. PLease help

Computational Thinking Support 2

unread,
Nov 16, 2020, 1:34:12 AM11/16/20
to Discussion forum for Computational Thinking, Cacklo Uncle, Computational Thinking Support 2, Ranjit John, Discussion forum for Computational Thinking, Kunal -
When you check the procedure, initially P and Q are assigned False. And there after it may change to True if the conditions satisfies. It it can only take either True or False.

Thanks and Regards
Nijin 
IITM Online Degree Programme

Reply all
Reply to author
Forward
0 new messages