Skip to content

Commit 664d51c

Browse files
author
python4me
committed
fixing posts
1 parent c552996 commit 664d51c

2 files changed

Lines changed: 17 additions & 25 deletions

File tree

_includes/footer.html

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,7 @@
1919
</p>
2020
</div>
2121

22-
<div class="footer-right">
23-
<p class="mb-0">
24-
Powered by
25-
<a href="https://jekyllrb.com" target="_blank" rel="noopener">Jekyll</a>
26-
with
27-
<a href="{{ site.data.meta.homepage }}" target="_blank" rel="noopener">{{ site.data.meta.name }}</a>
28-
theme.
29-
</p>
30-
</div>
22+
3123

3224
</div> <!-- div.d-flex -->
3325
</footer>

_posts/2020-11-26-lecture-notes-1.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -125,21 +125,21 @@ Tuples are just like lists but the difference is that you can't change them. Aga
125125
<class 'bool'>
126126
```
127127

128-
Another type that we have are `boolean`. This is simple a True or False statement. We'll make use of this when we get to how to write logical *expressions*.
128+
Another type that we have is `boolean`. This is a simple True or False statement. We'll make use of this when we get to how to write logical *expressions*.
129129

130130
```python
131131
>>> type('')
132132
<class 'str'>
133133
```
134134

135-
The last type, at least for now is `string`. Strings are anything you put inside ' 's you can also use " "s but you should be consistent with which one you use. Most people think about *writing* when thinking about strings. Yes that is true, but only to an extend. I wouldn't like to confuse you but `'3'` is also a string.
135+
The last type, at least for now is `string`. Strings are anything you put inside ' 's. You can also use " "s but you should be consistent with what you use. Most people think about *writing* when thinking about strings. Yes that is true, but only to an extend. I wouldn't like to confuse you but `'3'` is also a string.
136136

137137
```python
138138
>>> type('3')
139139
<class 'str'>
140140
```
141141

142-
So just keep in mind that anything between quotes is a string although strings have text inside them mot of the time, they can have any character you want. (Except the escape character, i.e. `\`)
142+
So just keep in mind that anything between quotes is a string although strings have text inside them most of the time, they can have any character you want. (Except the escape character on it's own, i.e. `\`)
143143

144144
This brings us to another thing you should note related to `print()`. The escape character: `\`. Backwards slash--unless it's used before certain characters like `n` and `t`--will disable the next character. What do I mean by this? Let's see:
145145

@@ -200,22 +200,22 @@ So here we face a NameError. And it clearly tells us that python doesn't know wh
200200
awesome
201201
```
202202

203-
So by defining this meaningless text, we made it a **variable**. Our `ikbal` variable has the value "awesome." And we did it by using the `=` operator. You should note that there are **reserved words** that you can't use for variables because they already have a meaning. Altough, when you're using sublime, these words will be highlighted so you won't have any trouble. These words are: and, as, assert, break, class, continue, def, del, elif, else, except, False, finally, for, from, global, if, import, in, is, lambda, nonlocal, None, not, or, pass, raise, return, True, try, while,with,and yield.
203+
So by defining this meaningless text, we made it a **variable**. Our `ikbal` variable has the value `"awesome"`. And we did it by using the `=` operator. You should note that there are **reserved words** that you can't use for variables because they already have a meaning. Altough, when you're using sublime, these words will be highlighted so you won't have any trouble. These words are: `and`, `as`, `assert`, `break`, `class`, `continue`, `def`, `del`, `elif`, `else`, `except`, `False`, `finally`, `for`, `from`, `global`, `if`, `import`, `in`, `is`, `lambda`, `nonlocal`, `None`, `not`, `or`, `pass`, `raise`, `return`, `True`, `try`, `while`, `with`, `and`, `yield`.
204204

205205
Here's a table of some data types and examples:
206206

207-
| What is it? | Name | Examples |
208-
| --------------- | ------- | ----------------------------------------- |
209-
| Text | string | 'ikbal', '12345', 'print()' |
210-
| Whole numbers | integer | 3, 4, 5, 345 |
211-
| Decimal numbers | float | 5.2, 6.8, 9.2E6 |
212-
| True or False | boolean | True, False |
213-
| Sets | set | {'ikbal', 'kuzey'}, {1, 5, 'ikbal'} |
214-
| Lists | list | [0, 1, 3, 4], ['ikbal', 'kuzey', 'ikbal'] |
207+
| What is it? | Name | Examples |
208+
| -------------------------------------------- | ------- | ----------------------------------------- |
209+
| Text (Anything inside '' actually) | string | 'ikbal', '12345', 'print()' |
210+
| Whole numbers | integer | 3, 4, 5, 345 |
211+
| Decimal numbers | float | 5.2, 6.8, 9.2E6 |
212+
| True or False | boolean | True, False |
213+
| Sets | set | {'ikbal', 'kuzey'}, {1, 5, 'ikbal'} |
214+
| Lists | list | [0, 1, 3, 4], ['ikbal', 'kuzey', 'ikbal'] |
215215

216216
# Operators
217217

218-
All these brings us to operators. Yes, I know, it's not as exiting to learn about data types and these basic stuff, but it'll be over soon. Operators are just like in math. They operate. I don't think high level explanations are very memorable so let's see some operators. Operators are *type-specific*, meaning that either they don't work for different types or that they work differently for different types. Don't try to memorize these. Try writing code that uses these operators. That'll make them stick more easily.
218+
All these brings us to operators. Yes, I know, it's not as exciting to learn about data types and these basic stuff, but it'll be over soon. Operators are just like in math. They operate. I don't think high level explanations are very memorable so let's see some operators. Operators are *type-specific*, meaning that either they don't work for different types or that they work differently for different types. Don't try to memorize these. Try writing code that uses these operators. That'll make them stick more easily.
219219

220220
## Integer and float operators
221221

@@ -374,9 +374,9 @@ True
374374
True
375375
```
376376

377-
There's also >, <, >=, <= but I'm sure you can guess what they do.
377+
There's also `>`, `<`, `>=`, `<=` but I'm sure you can guess what they do.
378378

379-
### Logical Operators
379+
## Logical Operators
380380

381381
`and`, `or`
382382

@@ -395,7 +395,7 @@ False
395395

396396
# Expressions
397397

398-
To be honest, all we were doing in the last section was checking the values of expressions. When you use objects with operators, you get expressions. For example `a = 5` is an expression just like `a is 5`. Some of these expressions are logical arguments. You may have noticed that in a big part of the operators we just saw, the shell returned either True or False. These expressions which return True or False are called logical statements just like in math. This brings us to **branching**.
398+
To be honest, all we were doing in the last section was checking the values of expressions. When you use objects with operators, you get expressions. For example `a = 5` is an expression just like `a is 5`. Some of these expressions are logical arguments. You may have noticed that in a big part of the operators we just saw, the shell returned either `True` or `False`. These expressions which return `True` or `False` are called logical statements just like in math. This brings us to **branching**.
399399

400400
# Branching
401401

0 commit comments

Comments
 (0)