Little script to retrieve the amount of weeks, days, hours and minutes from a given integer literal:
class TimeValues(object):
def __init__(self):
amount_minutes = 0
amount_hours = 0
amount_days [...]
May 2
Posted by Norman in Code Snippets | 2 Comments
Little script to retrieve the amount of weeks, days, hours and minutes from a given integer literal:
class TimeValues(object):
def __init__(self):
amount_minutes = 0
amount_hours = 0
amount_days [...]
Tags: Python, retrieve the amount of weeks days hours and minutes
The Luhn algorithm or Luhn formula, is a simple formula used to validate a variety of identification numbers, such as credit card numbers. Here is my implementation written in Python:
def checkDigit(digits):
digitList = []
digitOdd = []
checksumOdd = 0
[...]
Tags: Code Snippets, Luhn, Luhn algorithm, Luhn formula, Python
You are currently browsing the archives for the Code Snippets category.