Doubt regarding the activity question.

156 views
Skip to first unread message

Pavithra Manikandan

unread,
Oct 5, 2020, 5:38:18 AM10/5/20
to Discussion forum for Mathematics for Data Science I
Screenshot 2020-10-05 at 3.06.15 PM.png
How is the number of integers 5? Isn't root(49) = 7 which is intern an integer? 
pls clarify.

Thank you.

Sharmila Gunaseelan

unread,
Oct 5, 2020, 5:42:08 AM10/5/20
to Discussion forum for Mathematics for Data Science I, pavithra.m...@gmail.com
same doubt?
Message has been deleted
Message has been deleted
Message has been deleted

Christopher Raphael

unread,
Oct 6, 2020, 3:27:01 AM10/6/20
to Discussion forum for Mathematics for Data Science I
The unmodified list will have "6 counts" of "integer", since the question asks one to count the number of integers in the list. (did not ask for unique integers' count)

vikas maheswari

unread,
Oct 6, 2020, 3:28:40 AM10/6/20
to Discussion forum for Mathematics for Data Science I, sharmi...@gmail.com, pavithra.m...@gmail.com
Same as question is asking about number of integers in the list.

they have not even used the word sets or distinct integers. So answer should be 6.

Message has been deleted

Christopher Raphael

unread,
Oct 6, 2020, 4:12:28 AM10/6/20
to Discussion forum for Mathematics for Data Science I
let listOfReals = [ √3, 2.5, e, √49, 7, 22, pi, -35, √6, 1729, -20000 ];
let numberOfElementsInList = listOfReals.length; //=>length of the array = 11
let integerCount=0;

for(i=0; i<numberOfElementsInList; i++)
 {
  if(listOfReals[i]==INTEGER)
   {
   integerCount++;
   }
 }

Result> integerCount: 6
Because √49=7 and therefore will be counted as an integer.


On Monday, 5 October 2020 15:08:18 UTC+5:30, Pavithra Manikandan wrote:

Venkatesan Shesha Srikanth

unread,
Oct 6, 2020, 7:26:58 AM10/6/20
to Discussion forum for Mathematics for Data Science I
Hi,
    You are right, there are 6 integers in the given list. But now, we have corrected the list. Thank you
Warm regards
srikanth venkatesan
IITM Online degree project
3rd floor, IC&SR building, IIT Madras.
Reply all
Reply to author
Forward
0 new messages