ruby quiz solutions using python