AQ3.6 QUESTION 7

209 views
Skip to first unread message

Mitanshi Dhingra

unread,
Nov 2, 2020, 3:33:55 AM11/2/20
to Discussion forum for Computational Thinking
Is the following statement valid:

SumMarks (F, Chemistry) = 10  
TRUE OR FALSE
PLEASE EXPLAIN

Computational Thinking Support 2

unread,
Nov 2, 2020, 3:53:11 AM11/2/20
to Discussion forum for Computational Thinking, Mitanshi Dhingra
Hi Mitanshi,
A procedure can not be assigned by a constant or by a variable. If a procedure is return type then it should be assigned to some variable.
In the above question, SumMarks(F, Chemistry) is a procedure which will return sum of chemistry marks of female students but it is assigned to a constant value, 10 which is not a valid statement. Therefore the answer will be "NO".

I hope your doubt is cleared if not please write us again.

Thanks and Regards,
Deepak
IITM Online Degree Team

Anand Iyer

unread,
Nov 2, 2020, 3:53:30 AM11/2/20
to Discussion forum for Computational Thinking, Mitanshi Dhingra
A procedure cannot be assigned with a value.

It can only be called, and its return values can be assigned to other variable(s)

On Monday, November 2, 2020 at 2:03:55 PM UTC+5:30 Mitanshi Dhingra wrote:

Mitanshi Dhingra

unread,
Nov 2, 2020, 1:40:00 PM11/2/20
to Anand Iyer, Discussion forum for Computational Thinking
THANK YOU VERY MUCH FOR THE HELP!!🙂
Reply all
Reply to author
Forward
0 new messages