Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to create a variable that represents any integer in python

def integerCheck(x):
    if x < 0:
      y = -x
      if (y % 2 == True) or (y % 3 == True ):
        print( x, ' is an integer.')
      else:
        print(x, 'is not an integer')   
    elif x > 0:
       if (x % 2 == True) or (x % 3 == True ):
        print( x, ' is an integer.')
       else:
        print(x, 'is not an integer')
    else:
      print(x, 'is considered an integer') 

#Now you can check your number using integerCheck()      
    
Comment

PREVIOUS NEXT
Code Example
Python :: how to make a operating system in python 
Python :: how to create a matrix from list in python 
Python :: error aesthetics must be either length 1 or the same as the data (3) fill 
Python :: sublime autocomplete python 
Python :: printing with format 
Python :: why is there a lot of numbers in python 
Python :: selenium python element id 
Python :: prime numbers 1 to input 
Python :: value_counts sort by index 
Python :: get_int python 
Python :: inverse matrix gauss python 
Python :: img_sm = pygame.transform.scale(img, (32, 32)) 
Python :: rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrooom 
Python :: generate 50 characters long for django 
Python :: medium seaaborn mathplot diesign styles 
Python :: is cobol obsolete 
Python :: how to open a widget using sputil.get 
Python :: windows python pip upgrade 
Shell :: remove angular cli 
Shell :: conda install gensim 
Shell :: ubuntu update chrome browser 
Shell :: install git-lfs ubuntu 18.04 
Shell :: install rest framework 
Shell :: how can I find perticular extension in ubuntu? 
Shell :: install telnet alpine 
Shell :: github ssh test 
Shell :: alpine linux add nano 
Shell :: ping command not found docker 
Shell :: linux check cronjob log 
Shell :: install git winget 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =