🌐
AskPython
askpython.com › home › round up numbers in python without math.ceil()
Round Up Numbers in Python Without math.ceil() - AskPython
June 30, 2023 - The math.ceil() function is normally used to perform the ceiling operation on floating type, but we can substitute it using the round() function or manually write a program with math.modf() to do so.
🌐
JanBask Training
janbasktraining.com › community › python-python › ceil-and-floor-equivalent-in-python-3-without-math-module
Ceil and floor equivalent in Python 3 without Math module? | JanBask Training Community
August 18, 2025 - ... For negatives, int() already moves towards zero, so you don’t need to add 1 unless the number is positive with a fraction. ... Use // 1 for floor values since it works correctly for both positive and negative numbers.
🌐
Reddit
reddit.com › r/learnprogramming › sqrt without calculator
r/learnprogramming on Reddit: sqrt without calculator
June 15, 2021 -

In python, I am tasked with finding the floor square root of a number without using any built-in operators or functions. I have no idea how to start this, since using a for loop can only check the integer roots.

ex.

in : 8
out : 2
exp: sqrt(8) = 2.82842..., but floor(2.82842..) = 2
Find elsewhere
🌐
GeeksforGeeks
geeksforgeeks.org › python › floor-ceil-function-python
floor() and ceil() function Python - GeeksforGeeks
Apart from using the math module, we can also compute the floor and ceil of a float using basic arithmetic operations like floor division (//) and addition.
Published   January 10, 2018
🌐
Reddit
reddit.com › r/learnpython › how to round up without math modules?
How to round up without math modules? : r/learnpython
August 24, 2021 - Subreddit for posting questions ... will always round down, you can make use of that to create your own 'roundup' function by just casting your number as an int, then adding 1....
🌐
Upgrad
upgrad.com › home › blog › data science › floor function in python: the underrated trick!
Floor Function in Python: Definition, Uses & Examples
October 29, 2025 - It’s good practice to check for such cases using math.isfinite() before applying the floor function. The floor function only accepts numeric types like integers, floats, or values that can be converted to floats. Passing strings, lists, or complex numbers will raise a TypeError. ... Python handles large floats and integers internally without overflow, so the floor function can safely operate even on very large values.
🌐
Medium
medium.com › @kevingxyz › the-art-of-pythons-ceiling-and-floor-notation-684d4d354e1e
The Art of Python’s Ceiling and Floor using Operator | by Kevin | Medium
August 8, 2020 - Double slashes, and that is all for expressing math.floor(x / y) simply. What about ceiling? You may start to google but you might not be able to find anything on this immediately from Python’s documentation, since ceiling function does not comes with it’s own operator like floor function.
🌐
Reddit
reddit.com › r/learnpython › floor() function isn't working
r/learnpython on Reddit: floor() function isn't working
July 21, 2024 -

I'm just starting to learn and I wanted to try out the floor() function but it just keeps giving me "NameError: name 'floor' is not defined. Did you mean: 'float'?"

for example I'd tell it to floor(69.69696969) and it would just give me the error above.
Am I doing something wrong?

🌐
Codecademy
codecademy.com › docs › python:numpy › math methods › .floor()
Python:NumPy | Math Methods | .floor() | Codecademy
May 14, 2025 - In the NumPy library, the .floor() method rounds down a number or an array of numbers to the nearest integer that is less than or equal to the given value. It returns an array, with the elements separated by commas.
🌐
EDUCBA
educba.com › home › software development › software development tutorials › python tutorial › python floor function
Mastering Python Floor Function: A Comprehensive Guide
January 28, 2024 - In Math and Computer Science, the floor function provides the smallest integer for non-integer double and float values. For example, if we have 8/3, resulting in 2.6667, applying the floor function gives us 2. ... Valuation, Hadoop, Excel, Mobile ...
Address   Unit no. 202, Jay Antariksh Bldg, Makwana Road, Marol, Andheri (East),, 400059, Mumbai
🌐
CodeGym
codegym.cc › java blog › learning python › floor division in python
Floor Division in Python
November 11, 2024 - The symbol for floor division is //, which makes it easy to spot in code. When you use //, Python divides the two numbers and then truncates (removes) the decimal part, essentially “flooring” the result to the nearest whole number.
🌐
W3Schools
w3schools.com › python › ref_math_floor.asp
Python math.floor() Method
Python Examples Python Compiler Python Exercises Python Quiz Python Challenges Python Server Python Syllabus Python Study Plan Python Interview Q&A Python Bootcamp Python Certificate Python Training ... # Import math library import math # Round numbers down to the nearest integer print(math.floor(0.6)) print(math.floor(1.4)) print(math.floor(5.3)) print(math.floor(-5.3)) print(math.floor(22.6)) print(math.floor(10.0)) Try it Yourself »