Question: * Work in a word processor (not Idle!), starting from example playComputerStub.rtf, and save the file as playComputer.rtf. The file has tables set up for
* Work in a word processor (not Idle!), starting from example playComputerStub.rtf, and save the file as playComputer.rtf. The file has tables set up for this and the following two exercise.
Play computer on the following code:
(line 1) x = 0 # Exercise Play Computer Loop
(line 2) y=1
(line 3) for n in [5, 4, 6]:
(line 4) x = x + y*n
(line 5) y = y+1
(line 6) print(x)
Reality check: 31 is printed when line 6 finally executes.
Please show table.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
