equal
deleted
inserted
replaced
41 |
41 |
42 \begin{frame} |
42 \begin{frame} |
43 \titlepage |
43 \titlepage |
44 \end{frame} |
44 \end{frame} |
45 |
45 |
|
46 \begin{frame} |
|
47 \frametitle{Write your details...} |
|
48 On the top right hand corner please write down the following: |
|
49 \begin{itemize} |
|
50 \item Name: |
|
51 \item Affliation: |
|
52 \item Occupation: |
|
53 \end{itemize} |
|
54 \end{frame} |
|
55 |
46 \begin{frame}{} |
56 \begin{frame}{} |
47 What is the largest integer value that can be represented by Python? |
57 What is the largest integer value that can be represented by Python? |
48 \end{frame} |
58 \end{frame} |
49 |
59 |
50 \begin{frame}{} |
60 \begin{frame}{} |
69 What happens when we run this code? |
79 What happens when we run this code? |
70 \begin{lstlisting} |
80 \begin{lstlisting} |
71 a = False |
81 a = False |
72 b = True |
82 b = True |
73 c = True |
83 c = True |
74 if a and b or c: |
84 if (a and b) or c: |
75 print "You are correct!" |
85 print "You are correct!" |
76 \end{lstlisting} |
86 \end{lstlisting} |
77 \end{frame} |
87 \end{frame} |
78 |
88 |
79 \begin{frame}{} |
89 \begin{frame}{} |
99 \end{lstlisting} |
109 \end{lstlisting} |
100 What is the output? |
110 What is the output? |
101 \end{frame} |
111 \end{frame} |
102 |
112 |
103 \begin{frame}{} |
113 \begin{frame}{} |
104 How do you get the alternate elements of a list? |
114 How do you get the alternate elements of a list \emph{p}? |
105 \end{frame} |
115 \end{frame} |
106 |
116 |
107 \begin{frame}{} |
117 \begin{frame}{} |
108 How do you combine the two lists \emph{a} and \emph{b}? |
118 How do you combine the two lists \emph{a} and \emph{b}? |
109 \end{frame} |
119 \end{frame} |
113 \end{frame} |
123 \end{frame} |
114 |
124 |
115 \begin{frame}[fragile]{} |
125 \begin{frame}[fragile]{} |
116 \begin{lstlisting} |
126 \begin{lstlisting} |
117 >>> a = (1, 2, 5, 7) |
127 >>> a = (1, 2, 5, 7) |
118 >>> a[1] |
128 >>> a[1] = 3 |
119 \end{lstlisting} |
129 \end{lstlisting} |
120 What is the output? |
130 What is the output? |
121 \end{frame} |
131 \end{frame} |
122 |
132 |
123 \begin{frame}[fragile]{} |
133 \begin{frame}[fragile]{} |
135 0 a |
145 0 a |
136 1 b |
146 1 b |
137 2 c |
147 2 c |
138 3 d |
148 3 d |
139 \end{lstlisting} |
149 \end{lstlisting} |
140 by doing a small modification in the same two lines of code above? |
|
141 \end{frame} |
150 \end{frame} |
142 |
151 |
143 \begin{frame}{} |
152 \begin{frame}{} |
144 What can you use as the keys of a dictionary? |
153 What can you use as the keys of a dictionary? |
145 \end{frame} |
154 \end{frame} |