day1/Session-2.tex
changeset 49 2adb90f9e287
parent 46 63704b5650f1
child 50 aabaf8ec0a08
equal deleted inserted replaced
48:7f4c51382f89 49:2adb90f9e287
    76 \title[Basic Python]{Python:\\Functions and basic data structures}
    76 \title[Basic Python]{Python:\\Functions and basic data structures}
    77 
    77 
    78 \author[FOSSEE Team] {Asokan Pichai\\Prabhu Ramachandran}
    78 \author[FOSSEE Team] {Asokan Pichai\\Prabhu Ramachandran}
    79 
    79 
    80 \institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
    80 \institute[IIT Bombay] {Department of Aerospace Engineering\\IIT Bombay}
    81 \date[] {10, October 2009}
    81 \date[] {10, October 2009\\Day 1, Session 2}
    82 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    82 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    83 
    83 
    84 %\pgfdeclareimage[height=0.75cm]{iitmlogo}{iitmlogo}
    84 %\pgfdeclareimage[height=0.75cm]{iitmlogo}{iitmlogo}
    85 %\logo{\pgfuseimage{iitmlogo}}
    85 %\logo{\pgfuseimage{iitmlogo}}
    86 
    86 
   133   \item Repeat the procedure with the new number.
   133   \item Repeat the procedure with the new number.
   134   \item It appears that for all starting values there is a cycle of 4, 2, 1 at which the procedure loops.
   134   \item It appears that for all starting values there is a cycle of 4, 2, 1 at which the procedure loops.
   135 \end{enumerate}
   135 \end{enumerate}
   136     Write a program that accepts the starting value and prints out the Collatz sequence.
   136     Write a program that accepts the starting value and prints out the Collatz sequence.
   137 
   137 
   138 \end{frame}
       
   139 
       
   140 \begin{frame}{Problem 1.3 - Kaprekar's constant}
       
   141   \begin{enumerate}
       
   142     \item Take a four digit number--with at least two digits different.
       
   143     \item Arrange the digits in ascending and descending order, giving A and D respectively.
       
   144     \item Leave leading zeros in A!
       
   145     \item Subtract A from D.
       
   146     \item With the result, repeat from step 2.
       
   147   \end{enumerate}
       
   148   Write a program to accept a 4-digit number and display the progression to Kaprekar's constant.
       
   149 \end{frame}
   138 \end{frame}
   150 
   139 
   151 \begin{frame}[fragile]{Problem 1.4}
   140 \begin{frame}[fragile]{Problem 1.4}
   152   Write a program that prints the following pyramid on the screen. 
   141   Write a program that prints the following pyramid on the screen. 
   153   \begin{lstlisting}
   142   \begin{lstlisting}
   501 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   490 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   502 % TIME: 10 m, running 85m 
   491 % TIME: 10 m, running 85m 
   503 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   492 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   504 
   493 
   505 \begin{frame}
   494 \begin{frame}
   506   \frametitle{Did we meet the goal?}
   495   \frametitle{What did we learn?}
   507   \tableofcontents
   496   \tableofcontents
   508   % You might wish to add the option [pausesections]
   497   % You might wish to add the option [pausesections]
   509 \end{frame}
   498 \end{frame}
   510 
   499 
   511 \end{document}
   500 \end{document}