GRADED ASSIGNMENT 2,QUESTION NO.5

34 views
Skip to first unread message

Vishakh Agarwal

unread,
Oct 27, 2020, 1:22:36 AM10/27/20
to Discussion forum for Computational Thinking
SIR,
The step 2 for the given question is absolutely incorrect becuse if we initialise the MAX variable to 1, in a case when there are no customers (which is never impossible), the MAX would store 1 when it should actually store 0.
Logically, taking max=1 would get us the desired results in a generalised practical scenario but then again....if we are given the question as an mcq, we are made concious to think that we need to consider all the hypothetical cases and answer questions accordingly.I hope you would do the needful.THANK YOU

muska...@gmail.com

unread,
Nov 2, 2020, 7:12:08 AM11/2/20
to Discussion forum for Computational Thinking, vishakhag...@gmail.com
Having the same issue as the professors clearly mentioned in the videos that the initialization should be to an impossible number. They even initialised max to -1 for the report cards data set in Week 3 Lec 3.2. Really hoping they release an official clarification since the answer is contradictory to what we are being taught in lectures.
Especially since we should be aware of the instance that you have mentioned in your post because we can never know all possibilities about a dataset in advance and this method may not work.
Reply all
Reply to author
Forward
0 new messages