Page 113 - CA_Blue( J )_Class10
P. 113

3.  How many arguments are required to use the Math.random( ) method?
                       a.  0                                           b.  1
                       c.  2                                           d.  3
                    4.  The Math.ceil(Math.Max(3.5,2.3)) method will return ………………… .
                       a.  2.0                                         b.  3.0
                       c.  4.0                                         d.  4
                    5.  Which of the following methods returns the absolute value of a number?
                       a.  Math.pow( )                                 b.  Math.random( )
                       c.  Math.cbrt( )                                d.  Math.abs( )
                    6.  Which type of value is returned by the Math.max( ) method?
                       a.  boolean                                     b.  double
                       c.  Depends on the arguments                    d.  Both b and c
                    7.  Which of the following type of values is returned by Math.round( ) method?
                       a.  int                                         b.  double
                       c.  float                                       d.  None of these
                    8.  What is the output of Math.max(Math.min(4.5,7.4),5.3)?
                       a.  7.4                                         b.  4.5
                       c.  5.3                                         d.  None of these
                    9.  Which one of these mathematical methods is used to find cosine of an angle given in radians?
                       a.  Math.cos( )                                 b.  Math.tan( )
                       c.  Math.sin( )                                 d.  Math.pow( )
                                                                     3
                                                                   2
                    10.  Which of the following Java expressions represents the (a +b )/(a*b) +  a  mathematical expression?
                       a.  (aa + bbb)/(a * b) +  a
                       b.  (a * a + b * b * b) / (a * b) +  a
                       c.  (a * a + b * b) / (a * b) + Math.sqrt(a)
                       d.  (Math.pow(a, 2) + Math.pow(b, 3))/(a * b) + Math.sqrt(a)
                    11.  What does the Math.log() method return?
                       a.  The base 10 logarithm of a value.           b.  The natural logarithm (base e) of a value.
                       c.  The binary logarithm (base 2) of a value.   d.  The common logarithm (base 10) of a value.
                    12.  Which method would you use to generate a random number between 0.0 (inclusive) and 1.0 (exclusive)?
                       a.  Math.random()                               b.  Math.rand()
                       c.  Math.randomNumber()                         d.  Math.randomize()
                    13.  What is the result of Math.ceil(4.2)?
                       a.  4.0                                         b.  4.2
                       c.  5.0                                         d.  4
                    14.  What does the Math.sqrt() method do?
                       a.  Returns the square of a number.             b.  Returns the square root of a number.
                       c.  Returns the cube of a number.               d.  Returns the reciprocal of a number.

                 B.  Fill in the blanks.
                    1.  …………………  is the output of the Math.max(4.5,5) method.
                    2.  The Math.pow(4, 2) method will return ………………… .
                    3.  The return type of the Math.sqrt( ) method is ………………… .
                    4.  The result of Math.pow (2,3) +Math.sqrt(4) ………………… .
                                              3
                                           2
                    5.  The java expression of  (a +b )  ………………… .
                    6.  The java expression of (2abc *  (ab)) ………………… .
                    7.  The output of Math.cbrt(27) is ………………… .
                    8.  The Math.round(2.4) method gives the output ………………… .
                    9.  The Math.min(-3.4,-2.3) + Math.max(-3.4,-2.1) results ………………… .
                    10.  The data type returned by Math.rint() is ………………… .





                                                                                                                       111
                                                                                          Mathematical Library Methods   111
   108   109   110   111   112   113   114   115   116   117   118