This function should test if the `factor` is a factor of `base`.

Return `true` if it is a factor or `false` if it is not.

## About factors
Factors are numbers you can multiply together to get another number.

2 and 3 are factors of 6 because: `2 * 3 = 6`

- You can find a factor by dividing numbers. If the remainder is 0 then the number is a factor.
- You can use the mod operator (`%`) in most languages to check for a remainder

For example 2 is not a factor of 7 because: `7 % 2 = 1`

Note: `base` is a non-negative number, `factor` is a positive number.

Difficulty: introductory

Starter code:

def check_for_factor(base, factor):
	

Solutions:
def check_for_factor(base, factor):
    return base % factor == 0

def check_for_factor(b,f):
    return not b%f

def check_for_factor(base, factor):
    return not (base % factor)

def check_for_factor(base, factor):
    return True if base%factor == 0 else False

check_for_factor = lambda base, factor: base % factor == 0

check_for_factor=lambda a,b:not a%b

check_for_factor = lambda _,__: not _%__

def check_for_factor(base, factor):
    ans = False
    for x in range(base+1):
        if factor * x == base:
            ans = True
    return ans

def check_for_factor(n, factor):
    return factor != 0 and n % factor == 0

def check_for_factor(base, factor):
    integer = int(base / factor)
    return base / factor == integer

def check_for_factor(base, factor):
    f = [i for i in range(1, base+1) if base/i == base//i]
    return True if factor in f else False
    # your code here


def check_for_factor(base, factor):
    #base and factor are opposite?! No?
    return(base%factor==0)


def check_for_factor(base, factor):
    """(^-__-^)"""
    return base % factor == 0


def check_for_factor(base, factor):
    return factor in [i for i in range(1, base + 1) if base % i == 0]

check_for_factor = lambda b, f: (b/f).is_integer()

def check_for_factor(b, f):
    return 1 if b%f is 0 else 0

def check_for_factor(base, factor):
    # Given a base, check if factor can be divided by base w/ no remainder
    if (base % factor == 0):
        return True
    else:
        return False

def check_for_factor(base, factor):
     if base % factor == int():
        return True
     else:
        return False

def check_for_factor(base, factor):
    return int(base / factor) == base / factor

import unittest


def check_for_factor(base, factor):
    return base % factor == 0
    
    
class TestCheckForFactor(unittest.TestCase):
    def test_check_for_factor_should_return_true_when_factor_is_divided_by_base(self):
        base, factor = 10, 2
        actual = check_for_factor(base, factor)
        self.assertEqual(actual, True)

    def test_check_for_factor_should_return_false_when_factor_is_not_divided_by_base(self):
        base, factor = 9, 2
        actual = check_for_factor(base, factor)
        self.assertEqual(actual, False)


def check_for_factor(base, factor):
    print(base, factor)
    if base > factor:
        return base % factor == 0
    else:
        return factor % base == 0

import math

def check_for_factor(base, factor):
    return base % factor == 0

def check_for_factor(base, factor):
    ba = base / factor
    return(ba).is_integer()

def check_for_factor(base, factor):
    return divmod(base, factor)[1] == 0

def check_for_factor(base, factor):
    return True if (base / factor).is_integer() else False

check_for_factor = lambda b, f: b % f == 0

# def check_for_factor(base, factor):
#     return base % factor == 0


def check_for_factor(base, factor):
    remainder = base % factor
    if remainder > 0:
        return False
    else:
        return True

def check_for_factor(base, factor):
    if base % factor == 0 and base > 0:
        return True
    else:
        return False

check_for_factor = lambda base, factor: not base % factor

def check_for_factor(base, factor):
    m = []
    for i in range(1,base+1):
       if base%i == 0:
          m.append(i)
    return  factor in m

def check_for_factor(base,factor):
   
   check=False
   base=int(base)
   factor=int(factor)
  
   if factor > 0:
    if base%factor==0:
        check=True
    else :
        check=False
   else:
       check=False  
      
   return check   
      


def check_for_factor(base, factor):
    if base%factor==0:
        return True
    else:
        return False
s = check_for_factor(10,2)
print(s)

def check_for_factor(base, factor):
    s=base%factor
    if s==0:
        return True
    else:
        return False


def check_for_factor(base, factor):
    return base / factor % 1 ==0

def check_for_factor(base, factor):
    return True if base % factor is 0 else False

def check_for_factor(base, factor):
    if base < 0 or factor < 0:
        return False
    elif base % factor != 0:
        return False
    else:
        return True

def check_for_factor(base, factor):
    return factor != 0 and base % factor == 0

def check_for_factor(base, factor):
    return base%factor == 0

# from Russia with love


def check_for_factor(base, factor):
    if base > 0 and factor >=0:
        if base%factor == 0:
            return True
        else:
            return False


check_for_factor = lambda a,b: a % b == 0 
    # your code here


def check_for_factor(base, factor):

    check = base % factor
    
    if check > 0:
        return False
    else:
        return True

def check_for_factor(base, factor):
    a = base / factor
    if a - (int(a)) == 0:
        return True
    else:
        return False

def check_for_factor(base, factor):
    return [False, True][base%factor == 0]

def check_for_factor(base, factor):
    # your code here
    return base % factor == 0
    

print((check_for_factor(10,2)))


def check_for_factor(base, factor):
    """Check if factor is a factor of base"""
    return base % factor == 0

def check_for_factor(base, factor):
   return base%factor == 0 if base != 0 or factor != 0 else False

def check_for_factor(base, factor):
    return base % factor == 0 if factor != 0 and base != 0 else False

def check_for_factor(base, factor):
    for n in range (1,base):
        if base % (factor * n) == 0:
            return True
        else:
            return False

def check_for_factor(base, factor):
    # your code here
  if (base % factor == 0): 
    bool=True 
  else: 
    bool =False
  return bool 

def check_for_factor(base, factor):
    # your code here
    if base % factor == 0 and base > 0:
        return True
    elif base is None:
        return False
    else:
        return False

def check_for_factor(base, factor):
    if base and factor < 0:
        return None
    else:
        a = base % factor
        if a == 0:
            return True
        else:
            return False


def check_for_factor(base, factor):
    if base>=0 and factor>=0:
        if base%factor==0:
            return True
        else: 
            return False


def check_for_factor(base, factor):
    if factor % base == 0:
        return True
    if base % factor == 0:
        return True
    else:
        return False

def check_for_factor(base, factor):
    return bool(1) if base%factor==0 else bool(0)# your code here

def check_for_factor(base, factor):
    # your code here
    a = base % factor 
    if a==0:
        return True 
    else:
        return False 

def check_for_factor(base, factor):
    rem = base%factor
    if rem == 0:
      return True
    else:
      return False
    # your code here


def check_for_factor(base, factor):
    return base - factor * (base // factor) == 0 

def check_for_factor(base, factor):
    if base % factor != 0:
        return False
    elif base % factor == 0:
        return True

def check_for_factor(factor, base):
    return (factor % base) == 0

def check_for_factor(base, factor):
     if (base % factor) == 0:
         m = True     
     else: m = False
     return m

def check_for_factor(base, factor):
    i = base % factor
    if i == 0:
        return True
  
    else:
        return False

def check_for_factor(base, factor):
    x = base % factor 
    if x == 0:
        return True 
    else:
        return False 

def check_for_factor(base, factor):
# i take the parameters and convert in integer
    base = int(base)
    factor = int(factor)
#     here checking if the mod would evaluate to 0
    if base %factor == 0:
        return True
    else:
        return False 


def check_for_factor(base, factor):
    return True if int(base/factor)*factor == base else False

def check_for_factor(base, factor):
    if base % factor == 0 and base > 0 and factor > 0:
        return True
    else: 
        return False

def check_for_factor(base, factor):
    return base % factor == 0 if True else False

def check_for_factor(base, factor):
    i=base%factor
    if i!=0:
        return False
    return True
    # your code here


def check_for_factor(base, factor):
    print(factor % base)
    return True if base % factor == 0 else False 

def check_for_factor(base, factor):
    return base % factor == 0 and 0 not in [factor, base]

def check_for_factor(base, factor):
    
    if base < factor:
        return False
        
    if base is factor:
        return True
    else:
        if (base%factor) == 0:
            return True
        else:
            return False

def check_for_factor(base, factor):
        if base % factor == 0:
            print(str(factor) + ' is a factor of ' + str(base))
            return True
        
        else:
            print(str(factor) + ' is not a factor of ' + str(base))
            return False

def check_for_factor(base, factor):
    if  base >= 0 and factor > 0 :
        if base % factor == 0:
            return True
        else :
            return False
    else :
        return False

def check_for_factor(base, factor):
    if base%factor==0 or  factor%base==0:
        return True 
    else:
        return False

def check_for_factor(a, b):
    return not a % b

def check_for_factor(base, factor):
    # your code here
    remainder = base % factor
    if remainder == 0:
        return True
    else:
        return False

def check_for_factor(g, f):
    a = g % f
    if a != 0:
        return False
    else:
        return True

def check_for_factor(base, factor):
    a = base % factor# your code here
    if a == 0:
        c = True
    else:
        c = False
    return c

def check_for_factor(base, factor):
    if base % factor != 0:
        return False
    return True

def check_for_factor(base, factor):
    # your code here
    return bool(not(base % factor))

def check_for_factor(base, factor):
    ls=[]
    for i in range(1,base+1):
        if base%i==0:
            ls.append(i)
    if factor in ls:
        return True
    else:
        return False

check_for_factor = lambda base, factor: True if not base%factor else False

def check_for_factor(base, factor):
    test = True if base%factor == 0 else False;
    return test;

check_for_factor = lambda b,f: not bool(b%f)


def check_for_factor(base, factor):
    check = base % factor
    if (check == 0):
        return True
    else:
        return False

def check_for_factor(base, factor):
    return (False,True)[base%factor==0]

def check_for_factor(base, factor):
    return base//factor == base/factor

def check_for_factor(base, factor):
    resultat = False
    if (base % factor) == 0:
        resultat = True
    return resultat

def check_for_factor(base, factor):
    if factor == 0:
        return False
    else:
        return(base % factor == 0)

def check_for_factor(base, factor):
    case = base % factor
    if case == 0:
        return True
    else:
        return False

def check_for_factor(base, factor):
    if base % factor == 0:
        return True
    else:
        base % factor != 0
        return False

def check_for_factor(base, factor):
    x = 0
    return 1 if base % factor == x else 0

def check_for_factor(base, factor):
    print(base, factor)
    # your code here
    if base % factor == 0:
        return True
    else:
        return False

check_for_factor = lambda b,f: True if b%f==0 else False

def check_for_factor(b, f):
    if b % f == 0:
        return True
    else:
        return False

def check_for_factor(base, factor):
    return base / factor == int( base / factor )

def check_for_factor(base: int, factor: int) -> bool:
   return base % factor == 0

check_for_factor = lambda x,y: not x%y

def check_for_factor(base, factor):
    return(base//factor*factor == base)

def check_for_factor(base, factor):
    return True if float(base) / factor == base // factor else False

def check_for_factor(b, f):
    return True if b % f == 0 else False