上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 27 下一页
摘要: #!/usr/bin/python #coding=utf-8 #好好学习,天天向上 def describe_pet(type,name): print(f"i have a {type};") print(f"my {type}'s name is {name}!") describe_pet( 阅读全文
posted @ 2021-01-05 21:37 tigergaonotes 阅读(88) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/python #coding=utf-8 #好好学习,天天向上 def describe_pet(type,name): print(f"i have a {type};") print(f"my {type}'s name is {name}!") describe_pet( 阅读全文
posted @ 2021-01-05 21:34 tigergaonotes 阅读(80) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/python #coding=utf-8 #好好学习,天天向上 def user(username): """显示用户名""" print(f"hello,{username.title()}!") user("tiger") 阅读全文
posted @ 2021-01-05 21:28 tigergaonotes 阅读(41) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/python #coding=utf-8 #好好学习,天天向上 a = 1 while a <= 6: print(a) a = a + 1 #!/usr/bin/python #coding=utf-8 #好好学习,天天向上 a = 1 while a <= 6: a = a 阅读全文
posted @ 2021-01-04 22:04 tigergaonotes 阅读(60) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/python #coding=utf-8 #好好学习,天天向上 number = input("please enter a number:") number=int(number) if number % 2 ==0: print(f"the number {number} 阅读全文
posted @ 2021-01-04 21:58 tigergaonotes 阅读(216) 评论(0) 推荐(0) 编辑
摘要: 函数 input() 让程序暂停运行,等待用户输入值,之后再把值赋给变量,输出. 阅读全文
posted @ 2021-01-04 21:52 tigergaonotes 阅读(76) 评论(0) 推荐(0) 编辑
摘要: free是完全没有占用的空闲内存,Available 减 free是操作系统为了优化运行速度拿来调用的内存, 程序需要的话操作系统会进行释放。所以一般看Available即可。 free+buffer+cache 阅读全文
posted @ 2021-01-03 21:14 tigergaonotes 阅读(133) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/python #coding=utf-8 #好好学习,天天向上 age=12 if age<4: price=0 elif age<18: price=40 elif age>66: price=40 else: price=20 print(f"your admmssion 阅读全文
posted @ 2021-01-03 21:09 tigergaonotes 阅读(93) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/python #coding=utf-8 #好好学习,天天向上 cars=['audi','bmw','toyota','subaru'] for car in cars: if car == 'bmw': print(car.upper()) else: print(car. 阅读全文
posted @ 2021-01-03 21:02 tigergaonotes 阅读(41) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/python #coding=utf-8 #好好学习,天天向上 numbers=list(range(1,6)) print(numbers) range指定步长: #!/usr/bin/python #coding=utf-8 #好好学习,天天向上 numbers=list( 阅读全文
posted @ 2020-12-30 22:51 tigergaonotes 阅读(978) 评论(0) 推荐(0) 编辑
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 27 下一页