# Write a function to check a decimal with a precision of 2.
def is_decimal(num):
    import re

    dnumre = re.compile(r"""^[0-9]+(\.[0-9]{1,2})?$""")
    result = dnumre.search(num)
    return bool(result)
