loops/script.rst
changeset 278 461a68dbefb1
parent 254 c43677920502
child 365 0fbe8a18587f
equal deleted inserted replaced
277:d4cee7ebcf9b 278:461a68dbefb1
    61 to the right by 4 spaces. 
    61 to the right by 4 spaces. 
    62 
    62 
    63 Following is an exercise that you must do. 
    63 Following is an exercise that you must do. 
    64 
    64 
    65 %%1%% Write a ``while`` loop to print the squares of all the even
    65 %%1%% Write a ``while`` loop to print the squares of all the even
    66 numbers below 10. Then, return to the video.
    66 numbers below 10. 
    67 
    67 
    68 Please, pause the video here. Do the exercise and then continue. 
    68 Please, pause the video here. Do the exercise and then continue. 
    69 
    69 
    70 ::
    70 ::
    71 
    71 
    86   for n in range(1, 10, 2):
    86   for n in range(1, 10, 2):
    87       print n*n
    87       print n*n
    88 
    88 
    89 Following is an exercise that you must do. 
    89 Following is an exercise that you must do. 
    90 
    90 
    91 %%2%% Pause the video here and write a ``for`` loop to print the
    91 %%2%% Write a ``for`` loop to print the squares of all the even
    92 squares of all the even numbers below 10. Then, return to the video. 
    92 numbers below 10. 
    93 
    93 
    94 Please, pause the video here. Do the exercise and then continue. 
    94 Please, pause the video here. Do the exercise and then continue. 
    95 
    95 
    96 ::
    96 ::
    97 
    97