Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix link and layout in .md files #40

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions machine_learning_diary/base/data_type/bool.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,18 @@ True
**1. 这些符号并不是数学符号**

比如数学里面的等号“=”, python里的等号是”==“;
python里的“=” 是“赋值”,即我们在 **“变量”** 那一节学的内容,x=5, x作为一个变量,它的值是5
python里的“=” 是“赋值”,即我们在 **“变量”** 那一节学的内容,x=5, x作为一个变量,它的值是5

![](https://github.com/YZHANG1270/Girls-In-AI/blob/master/others/pics/ml_diary/bool/3.png?raw=true)

**2. 布尔表达式返回的True和False,是布尔类型的两个取值,它们不是字符串string**![](https://github.com/YZHANG1270/Girls-In-AI/blob/master/others/pics/ml_diary/bool/4.png?raw=true)
**2. 布尔表达式返回的True和False,是布尔类型的两个取值,它们不是字符串string**

![](https://github.com/YZHANG1270/Girls-In-AI/blob/master/others/pics/ml_diary/bool/4.png?raw=true)

第一个是布尔表达式返回的True,不带引号;
第二个是字符串string返回的格式str (string), 带引号。
**type( )**可以用来查询变量的格式。
**type( )** 可以用来查询变量的格式。



今天的内容是不是很简单呢?但不要忘了自己动手写一下哦。Coding就是熟能生巧!
今天的内容是不是很简单呢?但不要忘了自己动手写一下哦。Coding就是熟能生巧!
6 changes: 3 additions & 3 deletions machine_learning_diary/base/data_type/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ len(a)

```python
print(a[0]) # 数字0表示访问第一位置的元素
print(a[1]) # 数字0表示访问第二位置的元素
print(a[2]) # 数字0表示访问第三位置的元素
print(a[1]) # 数字1表示访问第二位置的元素
print(a[2]) # 数字2表示访问第三位置的元素

# output:
# Girls
Expand Down Expand Up @@ -160,4 +160,4 @@ print(a)
# ['and Girls', 'In', 'AI']
```

👩好啦,今天的课程就到这里啦!咱们下次见!~
👩好啦,今天的课程就到这里啦!咱们下次见!~
22 changes: 15 additions & 7 deletions machine_learning_diary/base/data_type/string.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,22 @@
返回字符串的长度,即字符串有多少个字符

![](https://github.com/YZHANG1270/Girls-In-AI/blob/master/others/pics/ml_diary/string/3.png?raw=true)
‘apple’这个字符串一共有5个字符,’a’, ‘p’, ‘p’, ‘l’, ‘e’
我们可以在这个函数上加一些玩法

‘apple’这个字符串一共有5个字符,’a’, ‘p’, ‘p’, ‘l’, ‘e’

我们可以在这个函数上加一些玩法

![](https://github.com/YZHANG1270/Girls-In-AI/blob/master/others/pics/ml_diary/string/4.png?raw=true)



#### 分割字符串

利用‘找字符’的方法‘[ ]’ 我们不仅可以找单独一个字符,我们也可以提取‘一部分’的字符串
例如我们想提取’apple’里面的最后三个字符’ple’ ![](https://github.com/YZHANG1270/Girls-In-AI/blob/master/others/pics/ml_diary/string/5.png?raw=true)
利用‘找字符’的方法‘[ ]’ 我们不仅可以找单独一个字符,我们也可以提取‘一部分’的字符串

例如我们想提取’apple’里面的最后三个字符’ple’

![](https://github.com/YZHANG1270/Girls-In-AI/blob/master/others/pics/ml_diary/string/5.png?raw=true)

- 你们看是不是有点奇怪,为什么我提取e的时候用的是length, 而不是length -1?

Expand All @@ -53,7 +59,7 @@



#### 用’in‘ 找字符
#### 用 `in` 找字符

in 是一个布尔运算符,可以比较两个字符串,所以返回值是true/false,很好理解,如
<img src="https://github.com/YZHANG1270/Girls-In-AI/blob/master/others/pics/ml_diary/string/7.png?raw=true" width="50%" height="50%" />
Expand Down Expand Up @@ -90,9 +96,11 @@ phone.upper() — method

- %d —— 格式化整数
- %g—— 格式化浮点数(带小数部分)
- %s —— 格式化字符串 <img src="https://github.com/YZHANG1270/Girls-In-AI/blob/master/others/pics/ml_diary/string/12.png?raw=true" width="80%" height="80%" />
- %s —— 格式化字符串

<img src="https://github.com/YZHANG1270/Girls-In-AI/blob/master/others/pics/ml_diary/string/12.png?raw=true" width="80%" height="80%" />

- 百分号%对int这个数据格式而言,是模运算符; 但对字符串而言,%是格式操作符

这样的函数和方法还有很多,运用起来并不困难。 没用过或者没见过这些函数都没关系,只要你在实践操作中遇到这样的难题,然后在网上直接搜索相关用法,就可以得到答案了。
还是那句话,熟能生巧。 你遇到的问题,别人早就遇到过了。
还是那句话,熟能生巧。 你遇到的问题,别人早就遇到过了。
4 changes: 2 additions & 2 deletions machine_learning_diary/base/data_type/variable.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ num = 2019
print(num)
```

![](https://github.com/YZHANG1270/Girls-In-AI/blob/master/others/pics/ml_diary/variable/newNum.png?raw=true)
![](https://github.com/YZHANG1270/Girls-In-AI/blob/master/others/pics/ml_diary/variable/num.png?raw=true)

看到这一步,你是不是觉得有点太简单了呢?我们创建了一个叫做num的变量,然后呢?
别着急,下面我们用num来print出一个新的数值吧
Expand All @@ -61,7 +61,7 @@ print(newNum)
```
再看看这次print出来的结果,有什么不一样呢?

![](https://github.com/YZHANG1270/Girls-In-AI/blob/master/others/pics/ml_diary/variable/num.png?raw=true)
![](https://github.com/YZHANG1270/Girls-In-AI/blob/master/others/pics/ml_diary/variable/newNum.png?raw=true)

在上面这一段代码里,我们在num这个变量的基础上,同个`+`这个操作,创建了一个新的变量,在这里这个`+`被称作`operator`, 今天只是简单的介绍,在以后的课程中我们会学到更多的operators.

Expand Down
4 changes: 2 additions & 2 deletions machine_learning_diary/base/env_config/Python_for_WIN.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ MacOS点击绿色图标Anaconda Navigator点开之后你将看见:



**注意!!接下来是Windows版本的方法介绍,MacOS的同学们请点击这个链接进行尝试:[点我!快点我!](https://github.com/YZHANG1270/Girls-In-AI/blob/master/machine_learning_diary/day-2/Python_for_MAC.md)**
**注意!!接下来是Windows版本的方法介绍,MacOS的同学们请点击这个链接进行尝试:[点我!快点我!](https://github.com/YZHANG1270/Girls-In-AI/blob/master/machine_learning_diary/base/env_config/Python_for_MAC.md)**



Expand Down Expand Up @@ -138,4 +138,4 @@ MacOS点击绿色图标Anaconda Navigator点开之后你将看见:

大家有什么不懂的可以第一时间Google一下或者提issue,也欢迎来跟@Girls-In-AI分享讨论今天的内容。

👩好啦,今天的课程就到这里,咱们下期见~!
👩好啦,今天的课程就到这里,咱们下期见~!