line comment is truedo loop + = print is truedo loop + print is truedo loop + = no test here print is falseskip loop predict what happens in this related little programnums list( while ( )nums append(ii + print(numscheck yourself by running the example program testwhile py the most general range function there is actually much simpler way to generate the previous sequences like in testwhile pyusing further variation of the range function enter these lines separately in the shell as in the simpler applications of rangethe values are only generated one at timeas needed to see the entire sequence at onceconvert the sequence to list before printingnums range( print(list(nums)the third parameter for the range function is the step size it is needed when the step size from one element to the next is not the most general syntax is rangestart pastend step the value of the second parameter is always past the final element of the list each element after the first in the list is step more than the previous one predict and try in the shelllist(range( )actually the range function is even more sophisticated than indicated by the while loop above the step size can be negative try in the shelllist(range( - )do you see how is past the end of the listtry itmake up range function call to generate the list of temperatures printed in the tea example test it in the shell these rangeslike the simpler ranges that we used earlierare most often used as the sequence in for loop heading while statements