day1/Session-1.vrb
changeset 46 63704b5650f1
equal deleted inserted replaced
45:3b8be02d94d4 46:63704b5650f1
       
     1 \frametitle {Basic looping}
       
     2   \begin{lstlisting}
       
     3 # Fibonacci series:
       
     4 # the sum of two elements
       
     5 # defines the next
       
     6 a, b = 0, 1
       
     7 while b < 10:
       
     8     print b,
       
     9     a, b = b, a + b
       
    10 
       
    11 \end{lstlisting}
       
    12 \typ{1 1 2 3 5 8}\\
       
    13 \alert{Recall it is easy to write infinite loops with \kwrd{while}}
       
    14   \inctime{20}