Replace this line with your code.
I can't see your code though. But, yes. Python, as many languages, is case-sensitive.
Yes it is, and indents matter a lot in Python. One wrong indent could mess up your entire code, so be careful!
the question is this----Properly indent the code with four spaces before eggs on line 2 and another four before return on line 3.
You should indent your code with four spaces.
what is wrong in the above code. im not getting the value of spam printed
Just as @chipjumper36731 additionally pointed at, indents matter in this language and so formatting your code will be helpful in administering help.
Please could you point me the exact exercise?
I tried your code intended like this, below, and the output is 12.
def spam(): eggs=12 return eggs print spam()
can you please explain the lines of code line by line
def spam(): # a function defined, called spam and it takes no argument eggs=12 # the variable eggs has been assigned a value 12 return eggs # returns the assigned value of the variable egggs print spam() # this prints to console the function defined.
If you haven't taken a programming course, and even if you have, I will recommend you code on as this will also be explained as you move on.
For now, I hope I helped!
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.