- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- 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 check if a float value is a whole number in Python?
To check if a float value is a whole number, use the float.is_integer() method. For example,
print((10.0).is_integer()) print((15.23).is_integer())
This will give the output
True False
- Related Articles
- How do I convert a float number to a whole number in JavaScript?
- How to check if a string can be converted to float in Python?
- Java Program to check if a Float is Infinite or Not a Number(NAN)
- How to use JavaScript to check if a number has a decimal place or it’s a whole number?
- How to check if a given number is a Fibonacci number in Python Program ?
- Python Program to Check if a Number is a Perfect Number
- Python Program to Check if a Number is a Strong Number
- Python Program for How to check if a given number is a Fibonacci number?
- How to check whether a value is a number in JavaScript?
- Check if a number is a Trojan Numbers in Python
- How to Check if a Number is Odd or Even using Python?
- How do I check that a number is float or integer - JavaScript?
- Python program to check if the given number is a Disarium Number
- Check if a given string is a valid number in Python
- How to check if field is a number in MongoDB?

Advertisements