1
00:00:01,390 --> 00:00:04,320
Variables are often described as boxes.

2
00:00:04,330 --> 00:00:07,030
You can store values in it.

3
00:00:08,440 --> 00:00:15,160
This idea can be helpful in the first few times you use a variable, but it isn't an accurate way to

4
00:00:15,160 --> 00:00:19,780
describe how variables are represented internally in Python.

5
00:00:19,930 --> 00:00:23,710
It's a much better to think of a variable as labels.

6
00:00:24,070 --> 00:00:28,120
You can assign values on them.

7
00:00:29,310 --> 00:00:34,080
You can also say that the variable references a certain value like this.

8
00:00:35,570 --> 00:00:42,050
So this things distinction probably won't matter much in your initial programs, but it's worth learning

9
00:00:42,050 --> 00:00:43,990
earlier rather than later.

10
00:00:44,000 --> 00:00:51,080
At some point you will see unexpected behavior from a variable and an accurate understanding of how

11
00:00:51,080 --> 00:00:56,630
variables work will help you identify what's happening in your code.

12
00:01:00,350 --> 00:01:06,840
Because most programs define and gather some sort of data and then do something useful with it.

13
00:01:06,860 --> 00:01:10,190
It helps to classify different types of data.

14
00:01:10,220 --> 00:01:14,810
The first data type, we will look at the string.

15
00:01:14,840 --> 00:01:22,820
Strings are quite simple at first glance, but you can use them in many different ways.

16
00:01:23,150 --> 00:01:25,400
A string is a series of characters.

17
00:01:25,430 --> 00:01:28,160
Anything inside quote is considered.

18
00:01:28,160 --> 00:01:30,470
For example, this is a string.

19
00:01:34,060 --> 00:01:43,750
So yeah, there's also you can write a string like this, for example, my special message.

20
00:01:43,990 --> 00:01:48,100
And here we will add single quote instead of double quote.

21
00:01:48,310 --> 00:01:51,040
Hello, my name is Stephan.

22
00:01:52,070 --> 00:01:58,100
And the flexibility allows you to use quotes and apostrophes within your strings.

23
00:01:59,160 --> 00:02:02,120
So let's write actual text here.

24
00:02:02,130 --> 00:02:02,790
Mice.

25
00:02:03,480 --> 00:02:05,040
My here.

26
00:02:12,610 --> 00:02:14,500
My another.

27
00:02:15,230 --> 00:02:16,880
Super string.

28
00:02:16,910 --> 00:02:20,500
And here we will do a sample.

29
00:02:20,510 --> 00:02:24,220
One of Python's strings.

30
00:02:25,470 --> 00:02:32,460
Is it's it's diverse and supportive community.

31
00:02:34,140 --> 00:02:34,830
That's it.

32
00:02:35,040 --> 00:02:37,980
Now, let's explore here.

33
00:02:37,980 --> 00:02:38,970
As you can see here, there's.

34
00:02:40,210 --> 00:02:42,730
Strings at this lecture.

35
00:02:42,760 --> 00:02:45,970
Now let's explore some of the ways you can use strings.

36
00:02:46,000 --> 00:02:51,370
The first is changing case in a string with methods.

37
00:02:51,370 --> 00:02:55,120
So I think we can now delete this here for now.

38
00:02:56,180 --> 00:02:58,130
And let's get more practical.

39
00:02:58,130 --> 00:02:58,610
All right?

40
00:02:59,590 --> 00:03:00,190
That's it.

41
00:03:01,010 --> 00:03:08,810
So here, one of the simplest tasks you can do with strings is change the case of the words in a string.

42
00:03:09,260 --> 00:03:11,560
So let's look at this code here.

43
00:03:11,570 --> 00:03:16,310
For example, my name is, for example, Oxley.

44
00:03:16,310 --> 00:03:17,720
Or actually, let's make it.

45
00:03:19,300 --> 00:03:22,930
Academy name is.

46
00:03:24,740 --> 00:03:25,730
Academy name.

47
00:03:27,520 --> 00:03:27,910
Here.

48
00:03:27,940 --> 00:03:29,230
This is a name.

49
00:03:29,590 --> 00:03:33,100
And here, Oxley Academy.

50
00:03:33,340 --> 00:03:40,660
And here we will print name that title of academy name that here.

51
00:03:40,660 --> 00:03:43,470
As you can see, we have several formats we use actually several.

52
00:03:43,510 --> 00:03:48,970
It's it's a lot of formats and functions, but you will learn all of these functions.

53
00:03:49,120 --> 00:03:50,500
Don't worry here.

54
00:03:50,500 --> 00:03:52,210
Now we will use title.

55
00:03:52,450 --> 00:03:53,410
That's it.

56
00:03:53,500 --> 00:03:56,380
Now let's actually run this code.

57
00:03:57,010 --> 00:03:59,050
And as you can see here.

58
00:03:59,830 --> 00:04:09,940
In this example, the variable academy name, the variable academy name refers to the lower case Oxilia

59
00:04:09,940 --> 00:04:10,590
Academy.

60
00:04:10,600 --> 00:04:13,300
See here lower case lowercase.

61
00:04:14,290 --> 00:04:16,120
The method title.

62
00:04:17,250 --> 00:04:21,500
Appears after the variable in the print.

63
00:04:21,510 --> 00:04:22,320
Right.

64
00:04:22,560 --> 00:04:27,150
So a method is an action that python can perform.

65
00:04:27,150 --> 00:04:30,720
One a piece of data.

66
00:04:30,810 --> 00:04:32,130
The dot here.

67
00:04:32,160 --> 00:04:33,270
The dot here.

68
00:04:34,690 --> 00:04:37,990
After name in the academic title.

69
00:04:39,160 --> 00:04:45,160
Cast fight on to make the title method act on a variable name.

70
00:04:45,340 --> 00:04:46,340
So that's it.

71
00:04:46,360 --> 00:04:49,420
Every method is followed by a set of parentheses, right?

72
00:04:49,540 --> 00:04:56,080
So because methods often need additional information to do their work, that information is provided

73
00:04:56,080 --> 00:04:58,030
inside the parentheses.

74
00:04:58,240 --> 00:05:03,890
So the title function doesn't need any additional information, so its parentheses are empty.

75
00:05:03,910 --> 00:05:09,080
So here let's as you can see, there's no additional information we can provide to title.

76
00:05:11,070 --> 00:05:14,410
So title method changes.

77
00:05:15,940 --> 00:05:25,040
Each word to title case where each word begins with capital letter oxa.

78
00:05:26,220 --> 00:05:27,240
Oxley.

79
00:05:29,350 --> 00:05:31,150
And here Capital letter A.

80
00:05:33,270 --> 00:05:34,080
Academy.

81
00:05:41,070 --> 00:05:41,880
That's it.

82
00:05:42,930 --> 00:05:48,360
So this is useful because you will often want to think of a name as a piece of information.

83
00:05:48,360 --> 00:05:54,090
For example, you might want your program to recognize the input value values.

84
00:05:54,090 --> 00:05:55,410
Auxly.

85
00:05:56,540 --> 00:06:05,660
Academy as the same name and display all of them as uppercase Oxley and then lowercase the title format.

86
00:06:05,660 --> 00:06:06,020
Right?

87
00:06:06,020 --> 00:06:12,890
So several other useful format methods are available for dealing with case as well.

88
00:06:12,890 --> 00:06:22,220
For example, you can change a string to all uppercase or all lowercase letters like this here.

89
00:06:22,220 --> 00:06:27,080
So here we will write instead of title, we will delete this and upper.

90
00:06:27,110 --> 00:06:28,100
That's it.

91
00:06:28,100 --> 00:06:29,060
Let's try this.

92
00:06:29,060 --> 00:06:31,070
And as you can see, uppercase.

93
00:06:31,080 --> 00:06:33,590
Let's actually delete this here.

94
00:06:34,400 --> 00:06:37,070
That's the output of us here.

95
00:06:37,100 --> 00:06:37,430
Oops.

96
00:06:37,430 --> 00:06:37,970
Sorry.

97
00:06:39,360 --> 00:06:39,840
Here.

98
00:06:40,320 --> 00:06:42,840
As you can see, an uppercase Lochside academy.

99
00:06:42,870 --> 00:06:48,090
Let's try the lowercase lower.

100
00:06:50,700 --> 00:06:53,850
As you can see here, lowercase Oxford Academy.

101
00:06:54,120 --> 00:06:57,640
So the lower method is particularly useful for storing data.

102
00:06:57,690 --> 00:07:02,010
So you typically want to want to trust the capitalization that your users provide.

103
00:07:02,010 --> 00:07:03,120
So will you.

104
00:07:03,150 --> 00:07:13,290
So you will convert strings to lowercase, will convert your strings to lowercase before storing them.

105
00:07:13,290 --> 00:07:19,140
Then you when you want to display the information, you will use the case that makes the most sense

106
00:07:19,140 --> 00:07:21,480
for each string.
