- 博客(7)
- 收藏
- 关注
原创 CH7 用户输入和while循环
playlist for today:Tasks接受用户输入并处理输入单个数据输入一系列数据让程序不断地运行获取用户输入并学会控制程序的运行时间,交互式程序ContentTasks7.1 input()函数的工作原理7.1 input()函数的工作原理input()function让程序暂停运行,等待用户输入文本,并将输入储存在变量中方便使用清晰、易于明白的提示name = input('enter you name please: ')print('good eve
2021-01-12 23:28:37
70
原创 CH6 字典
playlist for today: 周杰伦2007世界巡回演唱会Tasks将相关信息关联起来的python字典访问和修改字典中的信息遍历字典中的数据存储字典的列表存储列表的字典存储字典的字典ContentTasks6.1 一个简单的字典6.2 使用字典practice6.3 遍历字典6.1 一个简单的字典alien_0 = {'color': 'green', 'point': 5}6.2 使用字典字典是一系列 key-value pairs (键-值 对)dir =
2021-01-09 00:07:52
148
1
原创 CH5 if语句
playlist of today:周杰伦The One演唱会Task条件测试简单的if语句应用于列表、编写for循环处理列表中的大多数元素处理包含特定值的元素ContentTask5.1 一个简单实例5.2 条件测试练习5.3 if语句5.1 一个简单实例5.2 条件测试if语句的核心:条件测试 - 一个值为True或False的表达式检查是否相等=陈述、赋值==发问、检查条件car = 'audi' # 将car的值设定为audicar == 'audi' # c
2021-01-08 00:01:14
134
原创 CH4 操作列表
playlitst for today:folkloreTask遍历整个列表ContentTask4.1 遍历整个列表4.2 避免缩进错误4.3 创建数值列表练习4.1 遍历整个列表for循环# 4.1# for looptnt = ['mjq','dcx','syx','lyw','zzy','yhx','hjl']for zharen in tnt: print(zharen)原理:tnt中的每个元素分别轮流储存到变量zharen中,执行for循环中的指令,直到列表中的
2021-01-06 23:31:07
99
1
原创 CH3 列表简介
playlist for today: Super Junior Balled SongsTasks什么是列表如何使用列表元素3.1 What is listconsist of: 一系列按照特定顺序排列的元素用[]表示列表,用,分隔列表中的元素定义和输出列表tnt = ['mjq','dcx','syx','lyw','zzy','yhx','hjl']print(tnt)访问列表元素列表->有序集合,访问元素->指出列表名称和元素索引#3.1.1print(t
2021-01-06 21:53:04
98
1
原创 CH2 变量和简单数据类型
Tasks数据类型数据储存到变量如何在程序中使用变量2.1# Chapter 2 Variable print("hello world!")#2.2 vatiablemessage = "hello world!"print(message)message = "hello world! this line is writtend in 2021/1/3 18:11"print(message)#variable is changeable, and python alw
2021-01-04 16:58:13
87
1
原创 installing VScode and run
installing VScode下载vscode后安装python extensionsextensions icon -> Python extensions ->-> my file - open folder or drag the folder into the interface.setting for VScodefile -> Preferencesexecute in file dir (checkedrun and debugand get a
2021-01-03 18:04:55
77
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人