def test_rand_sum(): for i in range(1000): a = randint(-100,100) b = randint(-100,100) assert(get_sum(a,b) == a + b)
def test_rand_sum(): for i in range(1000): a = uniform(-100,100) b = uniform(-100,100) assert(get_sum(a,b) == a + b)
def test_sum(): for i in range(1000): first = uniform(-1000, 1000) second = uniform(-1000, 1000) assert(get_sum(first, second) == (first + first))
# return sum_1 # def main(): # print("Sum :", Sum.get_sum(1,2,3,4,5)) # class Dog: # num_of_dogs = 0 # def __init__(self, name = "Unknown"): # self.name = name # Dog.num_of_dogs += 1 # @staticmethod # def get_num_of_dogs(): # print("There are currently {} dogs".format(Dog.num_of_dogs)) # def main(): # spot = Dog("Spot") # doug = Dog("Doug") # spot.get_num_of_dogs() # main() #Custom modules #import sum from sum import get_sum print("Sum :", get_sum(1, 2, 3, 4, 5))
def test_rand_sum(): for i in range(1000): a = choice(al) b = choice(al) assert(get_sum(a,b) == a + b)
def test_sum(): assert (get_sum(1, 2) == 3)
def test_sum(): for i in range(1000): alphabet = "ABCDEFGHIKLMNOPQRSTVXYZ" first = choice(alphabet) second = choice(alphabet) assert(get_sum(first, second) == (first + first))