Quiz on Write to File in Python