Contact: aviboots(AT)netvision.net.il
39,066 questions
50,783 answers
573 users
d = 354.0 if d.is_integer(): print("float variable is an integer") else: print("float variable is not an integer") ''' run: float variable is an integer '''
import math d = 354.0 if math.floor(d) == d: print("float variable is an integer") else: print("float variable is not an integer") ''' run: float variable is an integer '''