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
Additionally, here is the error I get with the getRatio function
Here is the code
print ("Ratio %s" % (getRatio(prices['ABC'],prices['DEF'])))
I appreciate your kind assistance
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
Additionally, here is the error I get with the getRatio function Here is the code print ("Ratio %s" % (getRatio(prices['ABC'],prices['DEF']))) I appreciate your kind assistance