python script for interview problems