Signed up recently but had issues with the confirmation email?
Click Forgot password and follow the reset steps. You can choose the same password you used when you signed up. This should then provide access.
Remember to check Spam and Junk. The email will be from auth@progressbytes.co.uk.
301.12 Subprograms
Practise exam questionsSubprograms — Note 4 of 4
Local vs global.
Variables defined inside a function are local — they only exist inside that function. Parameters pass data into a function. Global variables exist outside all functions.
def double(n): # n is a parameter (local)
result = n * 2 # result is local
return result
x = 5 # x is global
print(double(x)) # 10
# print(result) # Error — result doesn't exist hereSpecification notes for programming are in Paper 2.