0
def plus_ten(a):
    return a + 10

plus_ten(2)

I thought that the plus_ten(2) would generate an output of 12, but when I run the code, it comes up with nothing.

Why is this?

This was lifted directly from: https://www.youtube.com/watch?v=lA9OuhldJd0&ab_channel=365DataScience

It shows in the video that there should be an output. However, in my VS studio, there is no output... please help!

  • 2
    Function calls (and other expressions) only automatically display their value when you're using Python in interactive mode - nothing like that happens when you're running your code as a script. Use `print(plus_ten(2))` to explicitly display the value. – jasonharper Dec 11 '22 at 00:07
  • Thank you so much, @jasonharper . I would have been stuck on this for hours. – VincentOfTheHighlands Dec 11 '22 at 00:13

0 Answers0