def PurchaseTraining(TypeOfTraining): if Cash >= TypeOfTraining: Cash -= TypeOfTrainingCost print "You have succesfully purchased", TypeOfTrainingString, ". You now have", Cash, "left." else: print "You do not have enough money."