Page 288 - Data Science class 11
P. 288

b. sname<-‘Rohit’
          Ans.  class(sname)

              Output
               [1]  “character”

               c. marks<-75L
          Ans.  class(marks)
              Output
               [1]  “integer”

               d. eligible<-TRUE
         Ans:  class(eligible)

               Output
               [1]  “logical”

            6.  Find the mode of the following data.
               a. 12,8,4,8,1,8,9,11,9,10,12,8

          Ans.  Mode is 8. (appearing the maximum number of times)
               b. 15, 22, 17, 19, 22, 17, 29, 24, 17, 15

          Ans.  Mode is 17
               c. 0, 3, 2, 1, 3, 5, 4, 3, 42, 1, 2, 0

          Ans.  Mode is 3
               d. 1,7,2,4,5,9,8,3

          Ans.  Mode is 1,7,2,4,5,9,8,3
            7.  The runs scored in a cricket match by 11 players is as follows:

               7, 16, 121, 51, 101, 81, 1, 16, 9, 11, 16

               Find the mean , mode , median of this data
          Ans.  Mean = Sum of the elements/number of elements
                 (7+16+121+51+101+81+1+16+9+11+16)
               =
                                   11
               = 39.09

              Mode is 16
               Median is 16 (After arranging the numbers in ascending order 1,7,9,11,16,16,16,51,81,101,121, the middle number
              is 16).
            8.  This is the XML code for students. Based on the code, generate the table.


               <students>
                <student>

                  <name>Rick Grimes</name>

                  <age>35</age>


          286   Touchpad Data Science-XI
   283   284   285   286   287   288   289   290   291   292   293