Home
About Us
Contact Us
Bookmark
Saved Bookmarks
Current Affairs
General Knowledge
Chemical Engineering
UPSEE
BSNL
ISRO
BITSAT
Amazon
ORACLE
Verbal Ability
→
General Awareness
→
IIT JEE in General Awareness
→
Differentiate ceil ( ) and floor ( ) function?
1.
Differentiate ceil ( ) and floor ( ) function?
Answer»
function
Description
syntax
Example
floor ( )
Returns the largest integer less than or equal to x
x = 26.7
y = -26.7
z = 23.2
Print(math.floor(x))
Print(math.floor(y))
Print(math.floor(z))
Output:
26
-27
-24
ceil ( )
Returns the smallest integer greater than or equal to x
x = 26.7
y = -26.7
z = 23.2
Print(math.ceil(x))
Print(math.ceil(y))
Print(math.ceil(z))
Output:
27
-26
-23
Show Answer
Discussion
No Comment Found
Post Comment
Related InterviewSolutions
Write note on format function?
Find the output?Program:x = 0 # global variabledef add ( ):global xx = x + 5 # increment by 2print (“Inside add ( ) function x value is:” , x)add ( )print (“In main x value is x)
Write note on return statement?
Give the syntax for defining variable – length arguments.?Syntax – Variable – Length Arguments:
Define nested blocks?
What are the two methods of passing arguments in variable length arguments?
Classify Function Arguments?
Any Loop can be converted to recursive functions. True / False
Write the output for the program given below?
Define default arguments?
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply
Your experience on this site will be improved by allowing cookies. Read
Cookie Policy
Reject
Allow cookies