1
00:00:05,460 --> 00:00:11,100
Welcome back everyone to the section on Python object and data structure basics.

2
00:00:11,120 --> 00:00:14,830
So in this section of the course we're going to start off by discussing basic data types.

3
00:00:15,700 --> 00:00:17,570
And these are your basic building blocks of code.

4
00:00:17,590 --> 00:00:22,390
When constructing larger pieces of code and we're going to quickly discuss all the possible data types

5
00:00:22,390 --> 00:00:26,560
that we're going to talk about in this section and then we'll have lectures that go into a lot more

6
00:00:26,560 --> 00:00:28,240
detail about each one.

7
00:00:28,240 --> 00:00:30,970
So don't worry about memorizing all the information shown here.

8
00:00:30,970 --> 00:00:32,480
This is more just a quick overview.

9
00:00:32,530 --> 00:00:36,390
And there's going to be a lecture on each of these data types as we go on throughout this section.

10
00:00:37,950 --> 00:00:41,850
So the data types that we're going to be discussing are the following in this table.

11
00:00:41,970 --> 00:00:44,540
Here we have the name of the data type on that left hand column.

12
00:00:44,610 --> 00:00:46,320
And then there's the type.

13
00:00:46,320 --> 00:00:51,900
So what that means is just Python has an internal key word for this name and you're not going to get

14
00:00:52,170 --> 00:00:57,010
the whole word integer the whole word floating point instead Python has kind of a shortened keyword.

15
00:00:57,030 --> 00:01:03,870
So that's the second column such as I.A. for integer SDR for strings etc. then we have the description

16
00:01:03,870 --> 00:01:07,620
column and that's just going to be what the actual description of the data type is.

17
00:01:07,620 --> 00:01:09,330
So let's quickly go through these.

18
00:01:09,360 --> 00:01:14,520
We start off with integers and those are just basic whole numbers such as three three hundred two hundred.

19
00:01:14,640 --> 00:01:16,350
Then we have floating point numbers.

20
00:01:16,440 --> 00:01:20,930
And those are numbers of a decimal point 2.3 4.6 hundred point zero.

21
00:01:21,120 --> 00:01:25,500
And notice here that if even if you have a hundred point zero that still counts as a floating point

22
00:01:25,500 --> 00:01:29,100
number that's no longer an integer because it has a decimal point.

23
00:01:29,100 --> 00:01:34,110
Then after that we have strings and strings are in ordered sequence of characters.

24
00:01:34,110 --> 00:01:39,540
You can think of these as just kind of words but you should also note they can be numbers as well as

25
00:01:39,780 --> 00:01:41,910
foreign characters inside of a string.

26
00:01:41,910 --> 00:01:46,540
The main thing that denotes a string is that either has double quotes or single quotes.

27
00:01:46,590 --> 00:01:49,940
Here we can see we have hello and double quotes Sammy in single quotes.

28
00:01:50,040 --> 00:01:53,400
We have the digits of 2000 inside double quotes.

29
00:01:53,490 --> 00:01:54,530
That makes a string.

30
00:01:54,530 --> 00:01:57,520
It's no longer just an integer because it has double quotes around it.

31
00:01:57,750 --> 00:02:01,320
And then you can also see we have some Japanese characters inside the quotes.

32
00:02:01,680 --> 00:02:08,160
Then we come to data structures and data structures are a little more specialized in basic data types

33
00:02:08,160 --> 00:02:14,340
and data objects because they can actually hold data objects in some sort of sequence or in some sort

34
00:02:14,340 --> 00:02:15,590
of mapping.

35
00:02:16,080 --> 00:02:19,610
So here we have lists and these are an ordered sequence of objects.

36
00:02:19,650 --> 00:02:24,180
Here we can see that we've been able to use square brackets and commas to you have a sequence of other

37
00:02:24,180 --> 00:02:27,430
objects such as the number 10 the string hello.

38
00:02:27,480 --> 00:02:33,190
And then the number two hundred point three dictionaries are another data structure that can store other

39
00:02:33,190 --> 00:02:37,060
data types except in this case instead of having an ordered sequence.

40
00:02:37,060 --> 00:02:39,140
They have unordered key value pairs.

41
00:02:39,220 --> 00:02:42,700
And we'll be discussing in a lot more detail how dictionaries work.

42
00:02:42,700 --> 00:02:48,370
But here we can see that we have a key than a colon and then a value and it's denoted by curly braces

43
00:02:48,460 --> 00:02:53,860
as far as if it's a dictionary instead of just being a normal list which has square brackets then we

44
00:02:53,860 --> 00:02:58,980
can have something like name and then colon and then the value of that name is Franki.

45
00:02:59,130 --> 00:03:04,230
Again we'll be discussing dictionaries in a lot more detail after dictionaries we have tuples sometimes

46
00:03:04,230 --> 00:03:05,500
are also called couples.

47
00:03:05,680 --> 00:03:08,360
And these are ordered immutable sequences of objects.

48
00:03:08,380 --> 00:03:13,550
They look a lot like glyphs except they have parentheses and they're immutable meaning you cannot change

49
00:03:13,840 --> 00:03:16,090
an object that's already in that sequence.

50
00:03:16,120 --> 00:03:17,940
So we'll be discussing what immutable means.

51
00:03:17,950 --> 00:03:23,290
And a lot more detail when discussing tuples than we have sets which are an unordered collection of

52
00:03:23,290 --> 00:03:24,730
unique objects.

53
00:03:24,730 --> 00:03:27,280
And again we'll talk about that and a lot more detail there.

54
00:03:27,310 --> 00:03:30,010
A little similar to a dictionary but they don't have key value pairs.

55
00:03:30,010 --> 00:03:33,070
Instead they're just unique objects in an ordered collection.

56
00:03:33,070 --> 00:03:34,960
So you don't have that colon key value pair.

57
00:03:35,240 --> 00:03:37,600
Again we'll discuss it in more detail later on.

58
00:03:37,600 --> 00:03:43,000
Then finally we'll talk about booleans which are just logical value values indicating true or false.

59
00:03:43,000 --> 00:03:47,100
Notice how we have capital T in capital F that sort of syntax is necessary for Python.

60
00:03:47,380 --> 00:03:48,800
So those are all the basic data types.

61
00:03:48,830 --> 00:03:53,230
Again don't worry if you didn't understand any of this or didn't want to memorize any of this we're

62
00:03:53,230 --> 00:03:57,130
going to have a lecture on Basically each of these topics in a lot more detail and show you how you

63
00:03:57,130 --> 00:03:58,640
can use them to write your own code.

64
00:03:59,490 --> 00:04:00,850
OK let's get started.

65
00:04:00,850 --> 00:04:01,810
I'll see you at the next lecture.
