

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to find the smallest number greater than x in Python?
The built-in function ceil() returns smallest number that is greater than the given number
>>> x=6.67 >>> import math >>> math.ceil(x) 7 >>> x=1.13 >>> math.ceil(x) 2 >>> x=5.78 >>> math.ceil(x) 6 >>> x=-5.78 >>> math.ceil(x) -5
Note that -5 is greater than -5.78
- Related Questions & Answers
- Find Smallest Letter Greater Than Target in Python
- Find smallest element greater than K in Python
- Smallest prime number just greater than the specified number in JavaScript
- Find Smallest Letter Greater Than Target in JavaScript
- How to get the smallest integer greater than or equal to a number in JavaScript?
- Program to find X for special array with X elements greater than or equal X in Python
- JavaScript - Find the smallest n digit number or greater
- Find the Number of segments where all elements are greater than X using C++
- Python Program to find out the number of sets greater than a given value
- Python - Find words greater than given length
- Count number of substrings with numeric value greater than X in C++
- Python - Number of values greater than K in list
- Find the Next perfect square greater than a given number in C++
- Python program to find the smallest number in a list
- Find the smallest number X such that X! contains at least Y trailing zeros in C++
Advertisements