Phyton Trasnfer of Control Question
Publish By:
Admin,
Last Updated:
20-Jul-23
Price:
$120
What is the complete transfer of control in the following code?
Note that line numbers are displayed for clarity. The line numbers are not part of the actual program.
Your answer must be a list of line numbers, in the appropriate order, from the start of execution to the end of execution.
Line 01: def updateInteger(num1,num2):
Line 02: sum = num1 + num2
Line 03: return sum
Line 04:
Line 05: def getText():
Line 06: sometext = input("Type a string: ")
Line 07: return sometext
Line 08:
Line 09: def main():
Line 10: num1, intVariable = 0,0
Line 11: while num1 < 2:
Line 12: intVariable = updateInteger(num1,num1+1)
Line 13: num1+=1
Line 14: stringVariable = getText()
Line 15: print(f`String received was, {stringVariable}`)
Line 16: print(f`Final value of integers is {intVariable}`)
Line 17: return
Line 18:
Line 19: main()