A0 Worksheet ÔÇô Make A Prediction (Repaired)
A0 Worksheet ÔÇô Make A Prediction (Repaired)
Lesson 18 - Subroutines
Task .
Line 1 is defining the function of the variables and saying what it should do.
They are local variables because they can’t be used outside the subroutine.
Line 2 is defining what answer is. It is saying answer should be the addition
between A and B
Line 3 is the print statement is going to print out the addition between a and b
and also the answer.
Line 5 is giving num1 a value and defining what num1 is. It is a global variable
as it can be used anywhere in the program
Line 6 is giving num2 a value and defining what num2 is. It is a global variable
as it can be used anywhere in the program
Line 8 is going to calculate the addition between num1 and num2 and answer
it and print it out.