You have the numbers from 1 to 1000 and one is missing. How can you find it?
Implement the function below. The input list contains every integer from 1 through n except one value, where n = 1000 for the stated problem. The same function may be tested with smaller n values.
Input: nums, a list of integers, and n, the upper bound. Output: the missing integer.
def find_missing_number(nums, n):