Math Function Class9 Sample-Paper
Math Function Class9 Sample-Paper
SAMPLE PAPER
Mathematical Library Methods
A. Tick ( ) the correct option.
1. Which among the following package is imported by default:
a. java.lang b. java.util
c. Both a and b d. None of these
Ans. a. java.lang
2. Which among the following class do not belong to the java.lang package?
a. System b. String
c. Math d. Scanner
Ans. d. Scanner
3. Which among the following function returns the absolute value of a number?
a. Math.absoulute( ) b. Math.neutral( )
c. Math.abs( ) d. Math.positive( )
Ans. c. Math.abs( )
4. Which among the following will yield -1 for negative number and 1 for positive number for a
number stored in a variable a?
a. Math.abs(a)*a b. Math.abs(a) / a
c. Math.ceil(a) / Math.floor(a) d. None of these
Ans. b. Math.abs(a) / a
5. Which among the following gives the next mathematical integer?
a. Math.floor( ) b. Math.ceil( )
c. Math.random( ) d. All of these
Ans. b. Math.ceil( )
6. What is the return type of Math.min(1,2.0f)?
a. float b. double
c. int d. long
Ans. a. float
7. Which among the following expression will return a random integer between 5 and 10 both
inclusive?
a. 5+(int)(Math.random()*6) b. 5+(int)(Math.random()*10)
c. 5+Math.random()*6 d. 5+Math.random()*10
Ans. a. 5+(int)(Math.random()*6)
8. Which among the following function is equivalent to Math.sqrt(a)?
a. Math.cbrt(a); b. Math.pow(a,1/2)
c. Math.pow(a,1/2.0); d. Math.
Ans. c. Math.pow(a,1/2.0);
9. What value will Math.sqrt(-9) return?
a. -3.0 b. 3.0
c. NaN d. None of these
Ans. c. NaN
10. What value will Math.sqrt(Math.ceil(8.1)) return?
a. 9.0 b. 9
c. 3.0 d. 4.0
Ans. c. 3.0
10. Math.round(146.5)
Ans. 147.0