basic-data-type/slides.tex
author Amit Sethi
Tue, 09 Nov 2010 01:28:00 +0530
changeset 406 a534e9e79599
parent 320 223044cf254f
child 412 bb45826efe74
permissions -rw-r--r--
Completed basic data type based on review and improved on slides
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
406
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
     1
% Created 2010-11-09 Tue 01:27
320
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
     2
\documentclass[presentation]{beamer}
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
     3
\usepackage[latin1]{inputenc}
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
     4
\usepackage[T1]{fontenc}
406
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
     5
\usepackage{fixltx2e}
320
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
     6
\usepackage{graphicx}
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
     7
\usepackage{longtable}
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
     8
\usepackage{float}
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
     9
\usepackage{wrapfig}
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
    10
\usepackage{soul}
406
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    11
\usepackage{t1enc}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    12
\usepackage{textcomp}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    13
\usepackage{marvosym}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    14
\usepackage{wasysym}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    15
\usepackage{latexsym}
320
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
    16
\usepackage{amssymb}
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
    17
\usepackage{hyperref}
406
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    18
\tolerance=1000
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    19
\usepackage[english]{babel} \usepackage{ae,aecompl}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    20
\usepackage{mathpazo,courier,euler} \usepackage[scaled=.95]{helvet}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    21
\usepackage{listings}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    22
\lstset{language=Python, basicstyle=\ttfamily\bfseries,
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    23
commentstyle=\color{red}\itshape, stringstyle=\color{darkgreen},
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    24
showstringspaces=false, keywordstyle=\color{blue}\bfseries}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    25
\providecommand{\alert}[1]{\textbf{#1}}
320
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
    26
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
    27
\title{Plotting Data }
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
    28
\author{FOSSEE}
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
    29
\date{2010-09-14 Tue}
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
    30
406
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    31
\usetheme{Warsaw}\usecolortheme{default}\useoutertheme{infolines}\setbeamercovered{transparent}
320
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
    32
\begin{document}
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
    33
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
    34
\maketitle
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
    35
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
    36
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
    37
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
    38
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
    39
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
    40
406
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    41
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    42
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    43
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    44
320
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
    45
\begin{frame}
406
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    46
\frametitle{Outline}
320
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
    47
\label{sec-1}
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
    48
\begin{itemize}
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
    49
406
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    50
\item Datatypes in Python
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    51
\label{sec-1_1}%
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    52
\begin{itemize}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    53
\item Numbers
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    54
\item Boolean
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    55
\item Sequence
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    56
\end{itemize}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    57
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    58
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    59
\item Operators in Python
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    60
\label{sec-1_2}%
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    61
\begin{itemize}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    62
\item Arithmetic Operators
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    63
\item Boolean Operators
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    64
\end{itemize}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    65
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    66
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    67
\item Python Sequence Datatypes
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    68
\label{sec-1_3}%
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    69
\begin{itemize}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    70
\item list
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    71
\item string
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    72
\item tuple
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    73
\end{itemize}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    74
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    75
320
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
    76
\end{itemize} % ends low level
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
    77
\end{frame}
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
    78
\begin{frame}
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
    79
\frametitle{Numbers}
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
    80
\label{sec-2}
406
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    81
320
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
    82
\begin{itemize}
406
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    83
\item Integers
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    84
\item Float
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    85
\item Complex
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    86
\end{itemize}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    87
\end{frame}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    88
\begin{frame}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    89
\frametitle{Question 1}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    90
\label{sec-3}
320
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
    91
406
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    92
\begin{itemize}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    93
\item Find the absolute value of 3+4j
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    94
\end{itemize}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    95
\end{frame}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    96
\begin{frame}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    97
\frametitle{Solution 1}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    98
\label{sec-4}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
    99
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   100
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   101
        abs(3+4j)
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   102
\end{frame}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   103
\begin{frame}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   104
\frametitle{Question 2}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   105
\label{sec-5}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   106
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   107
\begin{itemize}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   108
\item What is the datatype of number 999999999999999999? Is it
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   109
\end{itemize}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   110
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   111
not int?
320
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
   112
\end{frame}
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
   113
\begin{frame}
406
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   114
\frametitle{Solution 2}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   115
\label{sec-6}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   116
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   117
        
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   118
\begin{itemize}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   119
\item Long
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   120
\item Large integers numbers are internally stored in python
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   121
\end{itemize}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   122
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   123
        as Long datatype.  
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   124
\end{frame}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   125
\begin{frame}[fragile]
320
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
   126
\frametitle{Boolean}
406
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   127
\label{sec-7}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   128
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   129
\begin{verbatim}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   130
In []: t=True
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   131
In []: f=False
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   132
\end{verbatim}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   133
\end{frame}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   134
\begin{frame}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   135
\frametitle{Question 1}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   136
\label{sec-8}
320
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
   137
406
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   138
\begin{itemize}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   139
\item Using python find sqaure root of 3?
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   140
\end{itemize}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   141
\end{frame}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   142
\begin{frame}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   143
\frametitle{Solution 1}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   144
\label{sec-9}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   145
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   146
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   147
\begin{itemize}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   148
\item 3**0.5
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   149
\end{itemize}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   150
\end{frame}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   151
\begin{frame}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   152
\frametitle{Question 2}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   153
\label{sec-10}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   154
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   155
\begin{itemize}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   156
\item Is 3**1/2 and 3**0.5 same
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   157
\end{itemize}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   158
\end{frame}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   159
\begin{frame}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   160
\frametitle{Solution 2}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   161
\label{sec-11}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   162
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   163
\begin{itemize}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   164
\item No,One gives an int answer and the other float
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   165
\end{itemize}
320
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
   166
\end{frame}
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
   167
\begin{frame}
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
   168
\frametitle{Sequence Data types}
406
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   169
\label{sec-12}
320
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
   170
\begin{itemize}
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
   171
406
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   172
\item Properties
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   173
\label{sec-12_1}%
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   174
\begin{itemize}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   175
\item Data in Sequence
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   176
\item Accessed using Index
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   177
\end{itemize}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   178
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   179
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   180
\item Type
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   181
\label{sec-12_2}%
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   182
\begin{itemize}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   183
\item list
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   184
\item String
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   185
\item Tuple
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   186
\end{itemize}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   187
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   188
320
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
   189
\end{itemize} % ends low level
406
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   190
\end{frame}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   191
\begin{frame}[fragile]
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   192
\frametitle{All are Strings}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   193
\label{sec-13}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   194
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   195
\begin{verbatim}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   196
k='Single quote'
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   197
l="Double quote contain's single quote"
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   198
m='''"Contain's both"'''
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   199
\end{verbatim}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   200
\end{frame}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   201
\begin{frame}[fragile]
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   202
\frametitle{Immutabilty Error}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   203
\label{sec-14}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   204
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   205
\begin{verbatim}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   206
In []: greeting_string[1]='k'
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   207
---------------------------------------------------------------------------
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   208
TypeError                                 Traceback (most recent call       last)
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   209
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   210
/home/amit/st-scripts/basic-data-type/<ipython console> in <module>()
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   211
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   212
TypeError: 'str' object does not support item assignment
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   213
\end{verbatim}
320
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
   214
\end{frame}
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
   215
\begin{frame}
406
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   216
\frametitle{Question 1}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   217
\label{sec-15}
320
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
   218
406
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   219
\begin{itemize}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   220
\item Check if 3 is an element of the list [1,7,5,3,4]. In case
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   221
\end{itemize}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   222
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   223
it is change it to 21.
320
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
   224
\end{frame}
406
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   225
\begin{frame}[fragile]
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   226
\frametitle{Solution 1}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   227
\label{sec-16}
320
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
   228
406
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   229
\begin{verbatim}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   230
l=[1,7,5,3,4]
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   231
3 in l
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   232
l[3]=21
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   233
l
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   234
\end{verbatim}
320
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
   235
\end{frame}
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
   236
\begin{frame}
406
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   237
\frametitle{Question 2}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   238
\label{sec-17}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   239
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   240
\begin{itemize}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   241
\item Convert the string ``Elizabeth is queen of england'' to
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   242
\end{itemize}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   243
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   244
``Elizabeth is queen''
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   245
\end{frame}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   246
\begin{frame}[fragile]
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   247
\frametitle{Solution 2}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   248
\label{sec-18}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   249
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   250
\begin{verbatim}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   251
s="Elizabeth is queen of england"                                                                                                                 
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   252
stemp=s.split()                                                                                                                                   
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   253
' '.join(stemp[:3])
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   254
\end{verbatim}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   255
\end{frame}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   256
\begin{frame}[fragile]
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   257
\frametitle{Summary}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   258
\label{sec-19}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   259
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   260
\begin{verbatim}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   261
a=73
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   262
b=3.14
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   263
c=3+4j
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   264
\end{verbatim}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   265
\end{frame}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   266
\begin{frame}[fragile]
320
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
   267
\frametitle{Summary Contd.}
406
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   268
\label{sec-20}
320
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
   269
406
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   270
\begin{verbatim}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   271
t=True
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   272
f=False
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   273
t and f
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   274
\end{verbatim}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   275
\end{frame}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   276
\begin{frame}[fragile]
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   277
\frametitle{Summary Contd.}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   278
\label{sec-21}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   279
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   280
\begin{verbatim}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   281
l= [2,1,4,3]
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   282
s='hello'
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   283
tu=(1,2,3,4)
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   284
\end{verbatim}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   285
\end{frame}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   286
\begin{frame}[fragile]
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   287
\frametitle{Summary Contd.}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   288
\label{sec-22}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   289
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   290
\begin{verbatim}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   291
tu[-1]
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   292
s[1:-1]
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   293
\end{verbatim}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   294
\end{frame}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   295
\begin{frame}[fragile]
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   296
\frametitle{Summary Contd.}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   297
\label{sec-23}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   298
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   299
\begin{verbatim}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   300
Sorted(l)
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   301
\end{verbatim}
320
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
   302
\end{frame}
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
   303
\begin{frame}
406
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   304
\frametitle{Thank you!}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   305
\label{sec-24}
320
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
   306
406
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   307
  \begin{block}{}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   308
  \begin{center}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   309
  This spoken tutorial has been produced by the
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   310
  \textcolor{blue}{FOSSEE} team, which is funded by the 
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   311
  \end{center}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   312
  \begin{center}
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   313
    \textcolor{blue}{National Mission on Education through \\
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   314
      Information \& Communication Technology \\ 
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   315
      MHRD, Govt. of India}.
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   316
  \end{center}  
a534e9e79599 Completed basic data type based on review and improved on slides
Amit Sethi
parents: 320
diff changeset
   317
  \end{block}
320
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
   318
\end{frame}
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
   319
223044cf254f Adding new format st-scripts with questions etc for basic-data-type and
amit
parents:
diff changeset
   320
\end{document}