Input first 14 digits of IMEI number and this script will calculate what the check digit should be using the Luhn formula. Or input full 15 digits of IMEI number and the script will tell you if the checkdigit number is correct.
Usage:
python3 Luhn_Calc.py