Oops, try again. You should have exactly three print statements! (Make sure there are no occurrences of 'print' in any comment or string!)


#1

Hey! Trying to figure out this one.

My code goes:

stock = {"banana": 6, "apple": 0, "orange": 32}

for klic, value in stock.iteritems() :
-indent present here- print "%s costs: %s" % (klic, value)

but I am getting this message: _"Oops, try again. You should have exactly three print statements! (Make sure there are no occurrences of 'print' in any comment or string!)"

What am I doing wrong, please? Keep in mind that I am no programer, this is my first language and that I am bsically following the instructions of the tutorial up to this point where I dont understand what could be wrong. I have reduced the number of entries int he dictionary to three but didnt help, obviously. Thanks!


#2

the validation for this exercise is really strict. You should have 3 prints in your for loop to print the following things: product, price of product and stock of product


#3

Okay then. Seems like another copy-paste of somebodys code w/o actually knowing what I am doing.


#4

is the problem resolved?


#5

Factically is. Copy-paste helped to open another chapter of the course. I guess that I am somewhat dumb in case of coding.


#6

copy pasting is not recommended when learning to code/progrram


#7

Well.., I did not come to any better solution. I must be disabled in some way. I keep getting stucked on every single tutorial and when asking for help, I am usually been mocked or overwhelmed with statements like "you must declare a function before calling a procedure" which is actually of the same value to me as if it was written in ancient greek. : /


#8

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.