def all_nums(table):
    """Returns True if table contains only numbers
    Precondition: table is a (non-ragged) 2d List"""
    cnt = 0
    number_cnt = 0
    for row in table:
        for item in row:
            cnt += 1
            if type(item) in [int, float]:
                number_cnt += 1
    if cnt != number_cnt:
        print("table contains not only numbers")
        return False
    else:
        print("table contains only numbers")
        return True