The Threaded OS Assignment

This assignment uses multiple threads to verify the Collatz Conjecture.

You must use locking!
Due Thursday Sep 22. One half point per workday late
Here is the whole program written in Python.
def check(n):
    if (n == 1):  return 1
    if (n % 2 == 0): return check(n//2)+1
    else: return check(n*3+1)+1

max_so_far = 0
n_so_far = 0
for n in range(1,10000):
    length = check(n)
    if (length > max_so_far):
        max_so_far = length
        n_so_far = n
        print("New Biggest", n, "has", length,"steps.")
print("N = ", n_so_far, "\tCount = ", max_so_far)