I don't know what to check with orange


prices = {
'banana': 4,
'apple': 2,
'orange': 1.50,
'pear': 3

stock = {
'banana': 6,
'apple': 0,
'orange': 32,
'pear': 15

for key in prices:
print key
print "Price: %s " % prices[key]
print "Stock: %s " % stock[key]

Replace this line with your code.


@microace33580 ,

Compare the format that is specified in the instructions with the format of your output. Your format must match that of the instructions, exactly.


This is my original format. I guess there is sth wrong when I copied it.


Compare your output for "apple" to that specified in the following ...

Are there there any differences?


are you referring to the capitalization? I then changed it, but doesn't work


There may be something in addition to that. Are there any extra spaces in your output, either at the beginning, in the middle, or at the end of lines? How can you detect extra spaces at the end of a line of output?


Thank you for your advice and this is my output, but I don't see there's a difference lies in between.


You can select an entire line of text in order to find all its spaces. Try it with your output and with the format specified in the instructions in order to compare them. Also look carefully at the format strings in your code.

Here is some output from the console, prior to your correcting the occurrence of uppercase letters, with a line of text selected. Is there an extra space visible anywhere?

EDITED (December 22, 2016) to add a screen shot.


thank you! I found out that there is an extra space after the price of orange 1.5 and I delete the possible whitespace but no use.
Is there any other way to solve this here?


Could you post your code again?


I got it. Thank you!