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 3 of 4
Return a value to program.
A function is a subprogram that calculates and returns a value using the return keyword. The returned value can be stored in a variable or used in an expression.
return to send a value backresult = my_function() stores the returned valueint, str, bool, listreturn is reacheddef calculate_area(width, height):
return width * height
area = calculate_area(5, 3)
print("Area: " + str(area)) # Area: 15Specification notes for programming are in Paper 2.