第五课--PyInstaller
摘要:PyInstaller库的安装与使用: https://www.icourse163.org/learn/BIT-268001?tid=1461953449#/learn/content?type=detail&id=1238742662&cid=1259496190&replay=true
阅读全文
posted @
2021-01-25 18:47
长风青云
阅读(57)
推荐(0)
第五课--函数的定义与使用
摘要:函数理论部分: 1.函数的定义: 2.函数的调用: def Function(n) : # 计算阶乘 sum = 1 for i in range(1,n + 1) : sum *= i return sum print(Function(10)) 3.函数的参数传递: # 函数可以没有参数,但必须
阅读全文
posted @
2021-01-25 18:25
长风青云
阅读(308)
推荐(0)
第四课--random库
摘要:import random random.seed() # 按时间随机 print(random.random()) import random random.seed() # 按时间随机 print(random.random()) print(random.randint(1,100)) # r
阅读全文
posted @
2021-01-25 01:15
长风青云
阅读(97)
推荐(0)
第四课--程序的控制结构
摘要:分支结构: 1.单分支结构: # 猜数字 while True : a = eval(input()) if(a == 55): print("猜对了!") break 2.二分支结构: # 猜数字 while True : a = eval(input()) if(a == 55): print(
阅读全文
posted @
2021-01-25 00:35
长风青云
阅读(147)
推荐(0)
第三课--文本进度条实现
摘要:1.简单的开始: import time scale = 10 print(" 执行开始 ") for i in range(scale + 1) : a = '*' * i b = '.' * (scale - i) c = (i / scale) * 100 print("{:3^.0f}%[{
阅读全文
posted @
2021-01-24 20:36
长风青云
阅读(174)
推荐(0)
第三课--time库使用
摘要:time库: 时间获取:time() , ctime() , gmtime() 时间格式化:strftime() , strptime() 程序计时:sleep() , perf_counter() import time print(time.time()) # 1611487365.975021
阅读全文
posted @
2021-01-24 19:35
长风青云
阅读(77)
推荐(0)
第三课--数据类型
摘要:数值: 整数类型:可正可负,没有取值范围的限制 pow(x,y):x的y次方 十进制、二进制(0B、0b开头)、八进制(0o、0O开头)、十六进制(0X、0x开头) -0B101/0B101/0X9a 浮点类型:范围存在限制(-10^308 -- 10^308 ,精度数量级10^-16) 浮点数间运
阅读全文
posted @
2021-01-24 19:11
长风青云
阅读(150)
推荐(0)
第二课--图形绘制turtle
摘要:import turtle # 库引用,引入turtle库 # turtle.setup(width,height,startx,starty) startx/y可选(即默认正中心) turtle.setup(650,350,200,200) # 画笔操作后一直有效,直至下次重新设置 turtle.
阅读全文
posted @
2021-01-23 22:18
长风青云
阅读(316)
推荐(0)
第一课习题
摘要:1.Hello World 输出Hello World,注意大小写。 print("Hello World") 2.数字形式转换 获得用户输入的一个正整数输入,输出该数字对应的中文字符表示。
阅读全文
posted @
2021-01-23 14:46
长风青云
阅读(157)
推荐(0)
第一课-小程序描绘与入门语法分析
摘要:画同切圆: import turtle turtle.pensize(2); turtle.circle(10); turtle.circle(20); turtle.circle(40); turtle.circle(80); turtle.circle(160); 画五角星: from turt
阅读全文
posted @
2021-01-23 00:23
长风青云
阅读(102)
推荐(0)