[Tutor] Understanding error in recursive function

2016-04-08 Thread Tom Maher
Hi, As a test I am trying to write a function that returns the sum of values attached to one key in a dictionary. I am wondering why the code that I wrote is returning: "maximum recursion depth exceeded " Here is the code: animals = { 'a': ['aardvark'], 'b': ['baboon'], 'c': ['coati']} x = anima

[Tutor] Simple game

2016-03-24 Thread Tom Maher
Here is a simple game I am trying to create: print "pick a number between 0 and 100 and tell me if it my guess is too high (h) too low (l) or correct (c)" guess = 0 print 'my guess is 50' raw_input('your input ') n = 50 while raw_input != 'c' or 'h' or 'l': if raw_input == 'h':