Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python mod function

#the modulus operator is % in Python
5 % 3
#returns remainder: 2
Comment

mod in python

x1 = int(input())
y1 = int(input())
x2 = int(input())
y2 = int(input())

if( ( (x2-x1) % 2 = 1 and (y2-y1) % 2 = 1 ) or ( (x2-x1) % 2 = 0 and (y2-y1) % 2 = 0) ):
    print('YES')
else:
    print('NO')
Comment

PREVIOUS NEXT
Code Example
Python :: Convert column as array to column as string before saving to csv 
Python :: python create temp file 
Python :: python string cut to length 
Python :: oserror: invalid cross-device link 
Python :: flask session timeout 
Python :: Python Tkinter Button Widget 
Python :: python property decorator 
Python :: how to write to a specific line in a file python 
Python :: python command as an administrator 
Python :: modulo python 
Python :: check if list is empty python 
Python :: how to copy content of one file to another in python 
Python :: httplib python 
Python :: remove na python 
Python :: qpushbutton pyqt5 
Python :: reversed function python 
Python :: str replace pandas 
Python :: streamlit headings;streamlit text 
Python :: dm user discord.py 
Python :: python leetcode 
Python :: numpy fill with 0 
Python :: reshape python 
Python :: associate keys as list to values in python 
Python :: python string ends with 
Python :: record audio with processing python 
Python :: python - find columns that are objects 
Python :: flask set cookie 
Python :: string acharacters count in python without using len 
Python :: python sys.argv exception 
Python :: get html input in django 
ADD CONTENT
Topic
Content
Source link
Name
8+3 =