2021-02-21
2021年2月21日11:05:00https://www.bilibili.com/video/BV1N7411n7uv?from=search&seid=15888941028270481975
https://www.bilibili.com/video/BV1d7411w7hc/?spm_id_from=333.788.videocard.3
使用jupyter的方法:
1.使用crtl+ enter 运行当前代码。shift+enter运行并且进入下一行代码
2.alt + enter 插入新的单元格,
或者是按b下面添加,按a上面添加——below和above
3.使用单元格运行不同的类型,比如markdown————————Markdown文本
4.保存的位置在于C:\Users\83643保存位置
5.在cmd连续按住两次crtl+c关闭
6.快捷键 【坑】
7.打开方式必须是高速浏览器,ie不行的
8.esc命令模式模式,enter编辑模式,按住y进入pytho语法代码块,按M进入markdown语法代码块
9.Markdown语法,添加超链接[名字](网站),如(https://www.bilibili.com/)
添加图片则是 
- 代码块
$$渲染公式$$ ————这些可以看其他的https://www.jianshu.com/p/191d1e21f7ed
后面可好好看这个视频https://www.bilibili.com/video/BV1Q4411H7fJ/?spm_id_from=333.788.videocard.2以及关于markdown的使用 10. ctrl shift + c
The command palette can be accessed from the View menu or using the keyboard shortcut Command/Ctrl Shift C. 是不是要安装一下anaconda,研究一下spyder 啊?还有上次说的octave也是啊 使用 .bat文件编写指令@echo off
start cmd /kjupyter-lab
就可以快速打开jupyter lab ,免得我每次自己输入cmd很麻烦 本帖最后由 Python初学者8号 于 2021-2-21 19:18 编辑
关于昨天的问题的解答:
#!/usr/bin/env python
# coding: utf-8
# In:
test = list(range(6))
print('test is',test)
# In:
for t in test:
print('t=%s,id(%s)=%s '%(t,t,id(t)))
# In:
for i in range(6):
print('test=%s,id(%s)=%s '%(test,test,id(test)))
# In:
for t in test:
t = t**2
print('t=%s,id(%s)=%s '%(t,t,id(t)))
# In:
for i in range(6):
test = test**2
print('test=%s,id(%s)=%s '%(test,test,id(test)))
# In:
x = 6
print(id(x))
# In:
def f():
x= 6
print(id(x))
f()
# In:
def f():
x= 6
print(id(x))
f()
# In:
print(id(6))
可能是这样
1.for其实也是一种函数,它所提供的的i一个局部变量,然后i从哪里取值呢?是从in后年的可迭代传入值。并且要牢记python内存机制中关于变量赋值的‘标签’作用
2.id(object)只是找到对象的内存,和标签无关,标签只是指引这个对象而已
2021年2月21日15:15:09
https://www.bilibili.com/video/BV1yo4y1d7UK?from=search&seid=4960087711207245372
使用github
1.仓库
2.创建仓库
3.添加文件
2021年2月21日15:54:49 完成创建,很好 2021年2月21日19:30:29
快速的回顾了第16讲:
1.迭代:是一种重复的过程,并且每次重复的结果都作为下次的参数使用
2.max min的内在实现机制是比较逻辑运算, sum的内在实现机制是 + 运算,这就决定,前者不可以比较混合的str和int类型,后者不可以对str进行sum
3.可迭代对象现在很多,比如,列表的enumerate,zip,reverse
4.tuple只有count和index方法 2021年2月21日20:44:21
1.是否是某个类的函数!!isinstance(variable, class_name)
如class k:
pass
a = k()
print(isinstance(a,k))
2.还没搞懂报错的机制,还没搞懂如何让一个函数自己中间停止
3.做事情要想编程一样有序有计划的实施,起码是有目标的
页:
[1]