Whitespace exercise using Visual Studio


#1

When I use the same code in the exercise 6/13 in Visual Studio I get an error. Why is that possible?

Code given in the lesson:

   def spam():
          eggs = 12
          return eggs
    
    print spam()

Error message given:


#2

If you’re using Python 3, then the syntax is slightly different to the one on Codecademy (which uses Python 2’s syntax).

print, for instance, is print() in Python 3.


#3

Thank you for that information ghostlovescore.


#4

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