223,357 views
15 votes
15 votes
What is output by the following program?

def sample (val):
val = val - 8
#MAIN
n = 16
sample (n)
print (n)

User Praveen Govind
by
2.6k points

1 Answer

8 votes
8 votes

Step-by-step explanation:

I don't know what language this is, but the functions (methods) should work the same. It should change the value of n by decreasing it by 8 so the solution would be 8.

User Redanimalwar
by
3.3k points