- #1
jumbogala
- 423
- 4
Homework Statement
I am trying to write a program in which I have a function that uses the variable x.
For example,
def function(x):
x=x+2
return x
function(4)
Now I want to print out what x was inside the function. I thought I would just say
"print function(4)", but it's giving me an error message. "print function(x)" doesn't work either.
What am I doing wrong?