How do you get that code, see below, run in IDLE? I am stuck in my course right now and I could not find an explanation. I know how to run in IDLE just one \"def\" or code, pre
To answer your last question first: table
is a triple list, so a list of lists containing lists. One of those lists is [['Bill', 17], ['Zoe', 14]]
. Since hash_string
returns an index, it retrieves one list out of table
, which happens to be the one with Bill and Zoe.
Further, to run more than one function from within IDLE, you will have to create a new function (a new def my_assignment
or something) that calls the other functions.
Hope this helps.