You got a lot of good advice but no examples, so here's one for you. This is a simple program that calculates change in American coins. # Calculate the number of coins needed to make change for a given amount of money # Get input from user total = int(input("Enter amount of money in cents: ")) if total <= 0: print('no change') else: # calculate the number of coins num_dollars = total // 100 total %= 100 num_quarters = total // 25 total %= 25 num_dimes = total // 10 total %= 10 num_nickels = total // 5 total %= 5 num_pennies = total # print output print("Your change is:") print(f"{num_dollars} dollars") print(f"{num_quarters} quarters") print(f"{num_dimes} dimes") print(f"{num_nickels} nickels") print(f"{num_pennies} pennies") Most new programmers have code that looks like this. It's all in one file with no functions. Test it by running the program and typing 366. You should get the following output: Enter amount of money in cents: 366 Your change is: 3 dollars 2 quarters 1 dimes 1 nickels 1 pennies The problem is that this is not very testable, for several reasons: Everytime you run it, you have to MANUALLY input a test number. It would be much better if you could just type up a few tests and have it check the same tests every time you change something. You can't import this into another python file, cause it'll run all the code. You have manually LOOK with your eyes at the output to see if it's right. It would be nicer if the computer could just check itself without you. So the very first thing you have to do, before you're able to test, is to REFACTOR the code into something that's more testable. Separate the input from the calculations from the output. And make it importable by "hiding" it all behind a main() function. That might look something like this (exact_change.py): #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Calculate the number of coins needed to make change for a given amount of money """ def get_input(): ''' Get input from user ''' return int(input("Enter amount of money in cents: ")) def calculate_coins(total): ''' Calculate the number of coins needed to make change''' num_dollars = total // 100 total %= 100 num_quarters = total // 25 total %= 25 num_dimes = total // 10 total %= 10 num_nickels = total // 5 total %= 5 num_pennies = total return num_dollars, num_quarters, num_dimes, num_nickels, num_pennies def print_coins(num_dollars, num_quarters, num_dimes, num_nickels, num_pennies): ''' Print the number of coins needed to make change for a given amount of money ''' print("Your change is:") print(f"{num_dollars} dollars") print(f"{num_quarters} quarters") print(f"{num_dimes} dimes") print(f"{num_nickels} nickels") print(f"{num_pennies} pennies") def main(): total = get_input() if total <= 0: print('no change') else: num_dollars, num_quarters, num_dimes, num_nickels, num_pennies = calculate_coins(total) print_coins(num_dollars, num_quarters, num_dimes, num_nickels, num_pennies) if __name__ == '__main__': main() Now the code is separated into different parts and "hidden" behind the if __name__ == '__main__':, which means you can import it safely. You can test the calculation part separately by just calling calculate_coins(total) and seeing what it returns. So in a SEPARATE file (test_exact_change.py), you can do something like this: #!/usr/bin/env python3 # -*- coding: utf-8 -*- import unittest import exact_change class TestExactChange(unittest.TestCase): ''' Test the exact_change.py program ''' def test_calculate_coins(self): ''' Test the calculate_coins function ''' self.assertEqual(exact_change.calculate_coins(0), (0, 0, 0, 0, 0)) self.assertEqual(exact_change.calculate_coins(1), (0, 0, 0, 0, 1)) self.assertEqual(exact_change.calculate_coins(4), (0, 0, 0, 0, 4)) self.assertEqual(exact_change.calculate_coins(5), (0, 0, 0, 1, 0)) self.assertEqual(exact_change.calculate_coins(9), (0, 0, 0, 1, 4)) self.assertEqual(exact_change.calculate_coins(10), (0, 0, 1, 0, 0)) self.assertEqual(exact_change.calculate_coins(24), (0, 0, 2, 0, 4)) self.assertEqual(exact_change.calculate_coins(25), (0, 1, 0, 0, 0)) self.assertEqual(exact_change.calculate_coins(49), (0, 1, 2, 0, 4)) self.assertEqual(exact_change.calculate_coins(50), (0, 2, 0, 0, 0)) self.assertEqual(exact_change.calculate_coins(99), (0, 3, 2, 0, 4)) self.assertEqual(exact_change.calculate_coins(100), (1, 0, 0, 0, 0)) self.assertEqual(exact_change.calculate_coins(199), (1, 3, 2, 0, 4)) self.assertEqual(exact_change.calculate_coins(200), (2, 0, 0, 0, 0)) self.assertEqual(exact_change.calculate_coins(366), (3, 2, 1, 1, 1)) self.assertEqual(exact_change.calculate_coins(499), (4, 3, 2, 0, 4)) self.assertEqual(exact_change.calculate_coins(500), (5, 0, 0, 0, 0)) self.assertEqual(exact_change.calculate_coins(999), (9, 3, 2, 0, 4)) self.assertEqual(exact_change.calculate_coins(1000), (10, 0, 0, 0, 0)) if __name__ == '__main__': unittest.main() WHOA! That's a lot of tests! But the fun part is you only have to write them once. Now everytime you run this file - python test_exact_change.py, it will run all those tests, typically in about a millisecond, and tell you if anything is wrong. Rad. That's way faster than doing it manually, and much less chances of making a mistake, too. Hope this helps.