Computer Science
What is the output of math.ceil(4.4) ?
- 5
- 4
- 4.0
- 5.0
Python Modules
3 Likes
Answer
5
Reason — The math.ceil() function returns the smallest integer greater than or equal to the given number. For math.ceil(4.4), it returns 5, which is the smallest integer greater than 4.4.
Answered By
1 Like
Related Questions
Define a function which accepts n as an argument and prints Fibonacci series till n.
Consider the temperature given below for the month of June in North India. Calculate the average temperature and median value. This temperature gets dipped with a variation of 20°C in the month of December. Write a Python program to calculate the changed median value and average temperature.
Location Temperature (in °C) Delhi 41 Shimla 32 Chandigarh 43 Rohtak 40 Srinagar 28 Sri Ganganagar 45 Create a menu-driven program using user-defined functions to implement a calculator that performs the following:
(a) Basic arithmetic operations (+, −, *, /)
(b) log10(x), sin(x), cos(x)
Write a program that contains user-defined functions to calculate area, perimeter or surface area whichever is applicable, for various shapes like square, rectangle, triangle, circle and cylinder. The user-defined functions should accept the values for calculation as parameters and the calculated value should be returned. Import the module and use appropriate functions.