insidesherpa / JPMC-tech-task-1-PY3

50 stars 447 forks source link

Unable to get an output for getRatio function #125

Open Unekwu opened 4 years ago

Unekwu commented 4 years ago

I am trying to get an output for the getRatio function but I keep getting a Key Error with prices['DEF']. I tried printing the content of prices ['ABC'] and prices ['DEF']. However only the content of prices['ABC'] shows, but not prices['DEF']. I tried printing the content of prices ['DEF'] with the statement print ("prices [DEF] %s" %(prices['DEF'])) But I get this error image

Additionally, here is the error I get with the getRatio function image Here is the code print ("Ratio %s" % (getRatio(prices['ABC'],prices['DEF']))) I appreciate your kind assistance

rishabkumar7 commented 2 years ago

Try printing the prices dictonary to see if it has DEF, you can do that by having print (prices)