Computer Science, asked by rakshithracha64, 11 months ago

write the difference between floor() and ceil() in python​

Answers

Answered by krishshazia
5

Answer:

Python floor() is an inbuilt function that returns the floor of x, the largest integer not greater than x. Python ceil() is an inbuilt method that returns the ceiling value of x, the smallest integer not less than x. The floor() method in Python returns the floor of the provided value.

Answered by smartbrainz
0

Floor() accepts a number with decimal and returns an integer which is smaller than the number whereas the vice-versa is true for Ceil().

  • Function Ceil() accepts a number with decimal, as a parameter and returns an integer which is greater than the number itself.
  • In Python, a function refers to a set of code that accepts an input, performs the instructed computation on it and returns an output. A function is significant as it is a named program and a call can be made to it whenever required, instead of writing and compiling the same code again and again.
  • Both the functions Floor() and Ceil() belong to the Python Math module and give an output of the nearest Integer (greater or lesser) from a fractional input provided.

To know more about Python, visit:

https://brainly.in/question/9677174

Similar questions