EaÉgosggaf
_BBog3EEFTBMq•ʳMBam
Com put atio nal Thin king
☆
BBoEEEEBoEEoEEgBBo
Lee - 1 : Introduction to datasets
nothing much to note .
Lee 2
concept of variables iterators
:
and filtering
-
Iteration :
> When we
go through the sequence of objects that we have
and for each
object we
keep a count .
Say maintaining account which starts with
we are zero
time we keep incrementing
land as we
go one object at a ,
that count
lay 1 .
>
Count : ∅ +✗ = I
1/1-1 = 2
2×-1 = 3
;
29 + I
3¥
=
is to
> so , at the end
of the count
actually equal the total no .
of objects
we have Allen .
initialization in this
'
Count equal to O'
> The interator
itself has a case .
in the initialization .
when we run out
of things we are done
> .
,
> Count in a
quantity Crumb er ) which just keep changing as we
go along .
Hence it is called variable .
find out the marks
say we want to
in mathematics
average
.
We'd have to find marks in maths
sum
oftotal
and we
already know the no .
from
above 130) .
i. SUM = 0 +68 =
☒
68+62=130
130+57 72 36
2317,1
1871
=
:
Avg
'
=
≈
. . _ . .
=
:
<
Another :
varible
2099+72=21-71
> we wear perform the cabane two tasks
simultaneously .
So we track both the quantities together and in
the end we have
total
of cards and the sum all the marks in mathematics and
no
of
.
get the callerage .
> All would have also done for the other subjects at the same time .
So a total 3 variance 14 it we include count )
,
of .
in
> At the end
,
we can do all
of this
overlapping one iteration .
> Now
say
we are interested in aspiufio group of cards only .
so we
filter them out .
Say cards with
only verbs in them .
This process is walled When we take our data and pass it
→
filtering .
through filler wand anything which is caught by the fillers stays
ia
behind land all other the
thing pass through .
Now again ,
we do the
counting or we could do that while
filtering .
✗ 2131 ✗ $0 7 pronoun cards
± .
Lee -3 { Nothing much to write }
Introduction
Lee 4 to
flow charts
-
.
To describe in
a
sequence of step programming
flowcharts Pseudocode
flowcharts
☆ are
diagramatic res presentation of sequence of steps .
in
>
commonly used
symbols flowchart
write down
:
It is used to set
of operations
that data ( variables ]
can
change the value
of the
Process Activity
> : It shows the order
of execution of program steps
flow line Arrow
It determines which path the will take
program .
choice b/w
Generally two different
:
used to make a
alternative paths the
program can take .
Decision
It indicates the start End
:
or
of the program
Terminal
> flowcharts for counting cards :
are no more
cards , we
If there
>
end the program
carries
.
can
The vari ble count
the req value
.
.
> when we start ,
the cards rare all assumed to be in a
single pile
,
' '
walled pile y .
'
> we initiate.se the count variable to 0! This is where iterator starts .
we need to repeat the
following steps :
a.) Pick la card
from pill 1 .
b.) Mow it into different pile
a .
Clay pile 2)
c.) Increment the value
of count . { The iteration stops when pile ↑ is empty } .
we need to
pick card
from pile 1 but we can do that
only if there
>
a .
are more cards in pile 1 to pick .
Two outcomes are
possiblehere Either there are no more .
wards
Culndition =
false) or there are more wards Coondition True ) =
> If there are cards in pile 1 , we pick a ward
from the pile .
Let's call this
card ✗ .
don't revisit
' '
again it to pile 2 :
'
> to make sure that we word ✗ ,
we move
all their increment the value
of count .
we now back to the
beginning of the iteration
>
go .
full do
day we
we
Manto to
do that ?
find out sum
of math marks
using flowcharts .
How
is make small Instead
All we need to do
changes to the
flowchart .
count we make it ie we don't have count variable
of
but have sum
.
sum
,
va
we variable .
> Instead
of initiates
ing count = 0
, we make sum = 0 .
MG instead
' '
increment count it to add maths marks ward X
of ,
change
we
of
to sum Rest
.
of the
flowchart remains the same .
The remains
☆ Observation : flowchart more or less the same with
only minute
tweens .
Hence we can generate¥ .
> Generic flowchart for iteration :
flowchart
> Lees :
for sum with
filtering
say we want to do sum
of Boys maths marks
only .
Lee -
6 Sanity of data
It means to check for wrong entry or false data (watch
.
tic .
)
> Lee -
7 Introduction to datatypes
< , >, = Boolean
Lee -
8 subtypes of Basic data types
✗
,
do not make
÷
<
sense for marks
.
# and its subtypes
String data type
* string ka Matlab something that is sequence of characters and we do not put any
restrictions on the length of the sequence or on the type of characters.
be city
Could
well
as
Lee -9
Transformation of sub datatypes
-
>
Printlo)="1Jan "
Prin-1131)= " "
lfeb
Operation Result
Print String
< , > ,= Boolean
31+28+31+30 -131+30+31+15 I
221
-