I don't know what to check with orange


#1



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.


#2

@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.


#3

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


#4

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

Are there there any differences?


#5

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


#6

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?


#7

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


#8

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.


#9

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?


#10

Could you post your code again?


#11

I got it. Thank you!


#12