You are viewing a single comment's thread. Return to all comments →
def howManyGames(p, d, m, s): # Return the number of games you can buy cost = p count = 0 while cost <=s: if p-d > m: p = p - d cost += p count += 1 else: cost += m count += 1 return count
Seems like cookies are disabled on this browser, please enable them to open this website
Halloween Sale
You are viewing a single comment's thread. Return to all comments →