- 博客(25)
- 收藏
- 关注
转载 python基础篇-使用list和tuple
listprint(classmates)classmates.pop()print(classmates)classmates.pop(1)print(classmates)classmates[1] = 'Sarah'print(classmates)L = ['Apple', 123, True]print(L)s = ['pythono', 'java',...
2018-12-28 10:50:00 103
转载 python基础篇-字符串和编码
字符串print('包含中文的str')print(ord('A'))print(ord('中'))print(chr(66))print(chr(25991))print('\u4e2d\u6587')print('ABC'.encode('ascii'))print('中文'.encode('utf-8'))#print('中文'.encode('ascii'))prin...
2018-12-28 09:57:00 110
转载 python基础篇-数据类型和变量
字符串print('I\'m ok.')print('I\'m learning\nPython.')print('\\\n\\')print('\\\t\\')print(r'\\\t\\')print('''linel...line2...line3''')print('''linelline2line3''')# -*- coding: utf-8 _*_print(r...
2018-12-28 09:54:00 108
转载 python基础篇-输入和输出
输出print ('hello, world')print('The quick brown fox', 'jumps over', 'the lazy dog')print(300)print(100+200)print('100 + 200 = ', 100 + 200)输入name = input('please enther your name:')p...
2018-12-28 09:50:00 90
转载 python3.7-初学篇-21
Python源码剖析《Python源码剖析》是2008年06月电子工业出版社出版的图书,作者是陈儒。书名Python源码剖析——深度探索动态语言核心技术作者陈儒ISBN9787121068744类别图书 >> 计算机/网络 >> 程序设计 >> 其他定价¥69....
2018-12-14 20:05:00 160
转载 python3.7-初学者-20
1、登录,三次登录锁定用户 用户信息的文件 黑名单的文件 1、黑名单里面检测,不让登录 2、用户名单密码判定2、三级菜单 dic = { "省":{ "市":['县] } } #字典,列表 dic.keys() dic["省"].keys() dic["省"]["市"] d...
2018-12-12 21:05:00 78
转载 python3.7-初学篇-19-良好的习惯
1、Readme 文件,告诉别人如何使用你的程序(必须)2、代码加注释,让别人可以轻松读懂你的代码(必须)3、目录结构要符合规范,每天单独一个目录,如Day1,Day2,Day3..(必须)4、流程图,帮自己理清思路、帮别人更容易了解你的代码设计逻辑(必须) #推荐ProcessOn5、blog(博客),写好blog,让更多的人知道你,关注你(必须) ...
2018-12-11 22:44:00 81
转载 python3.7-初学篇-18
变量起名 1. 显示 2. nums_of_alex_gf = 19 这是对的 3. NumsOfAlexGf = 2 这是对的 4. names-of-alex-gf = 22 这是错的 5. 5name = 数字不能开头,na5me= 6. !name 特殊字符不能有,~!@¥% 7. name of teacher = 不能有空格...
2018-12-11 21:33:00 99
转载 python3.7-初学篇-17
import sysimport pygamedef run_game(): #initialize game and create a dispaly object pygame.init() screen = pygame.display.set_mode((1200,800)) pygame.display.set_caption("Alie...
2018-12-11 21:32:00 90
转载 python3.7-初学篇-16
for i in range(10): if 1%2 !=0: print(i) continue i += 2 print(i)转载于:https://www.cnblogs.com/liangbannerhulk/p/10105403.html
2018-12-11 21:30:00 121
转载 python3.7-初学篇-15
bingo = '小甲鱼是鳖哥'answer = input ('请输入小甲鱼最想听的一句话:')while True: if answer == bingo: break answer = input('抱歉,错了,请重新输入(答案正确才能退出游戏):') print('哎哟,帅哦~')print('您真是小甲鱼肚子里的蛔虫啊^-^')转载于:https://...
2018-12-11 21:28:00 80
转载 python3.7-初学篇-14
score = int (input ('请输入一个分数:'))if 100 >= score >= 90: print ('A')elif 90 > score >= 80: print ('B')elif 80 > score >= 60: print ('C')elif 60 > score >= 0: print (...
2018-12-11 21:27:00 72
转载 python3.7-初学篇-13
score = int (input ('请教您的分数:'))if 100 >= score >= 90: print ('A')else: if 90 > score >= 80: print ('B') else: if 80 > score >= 60: print ('C') else:...
2018-12-11 21:26:00 92
转载 python3.7-初学篇-11
打飞机框架加载背景音乐播放背景音乐(设置成单曲循环)我方飞机诞生interval = 0while True if 用户是否电击了关闭按钮: 退出程序 interval += 1 if interval == 50: nterval = 0 小飞机诞生 小飞机移动一个位置 屏幕刷新 if 用户鼠标产生移动: ...
2018-12-11 21:23:00 120
转载 python3.7-初学篇-12
score = int ( input ( '请输入一个分数:' ) )if 100 >= score >= 90: print('A')if 90 > score >= 80: print('B')if 80 > score >= 80: print('C')if 60 > score >= 0: print('D')if...
2018-12-11 21:23:00 98
转载 python3.7-初学篇-10
import randomsecret = random.randint(1,10)print('-----------------我爱鱼C工作室----------------')temp = input("不妨猜一下小甲鱼现在心里想的是哪个数字:")guess = int(temp)while guess != secret: temp = input("哎呀,猜错了,请重新输入...
2018-12-11 21:22:00 132
转载 python3.7-初学篇-09
if guess == 8: print( "哇草,你是小甲鱼心里的蛔虫吗?") print( "哼,猜中了也没有奖励" )else: if guess > 8: print( "哥,大了大了~~~") else: print( "嘿,小了!小了!!")print ( "游戏结束,不玩啦~~~~ ")转载于:https...
2018-12-11 21:21:00 100
转载 python3.7-初学篇-07
# -*- coding: utf-8 -*-我爱鱼C,正如我爱小甲鱼,他那呱唧呱唧呱唧呱唧呱唧呱唧的声音,总缠绕于我的脑海,久久不肯散去...转载于:https://www.cnblogs.com/liangbannerhulk/p/10105305.html...
2018-12-11 21:20:00 125
转载 python3.7-初学篇-08
from flask import Flaskapp = Flask(__name__)@app.route("/")def hello():return "Hello World!"if __name__ == '__main__':app.run()转载于:https://www.cnblogs.com/liangbannerhulk/p/10105308...
2018-12-11 21:20:00 65
转载 python3.7-初学篇-06
print('-----------我爱鱼C工作室---------')temp = input("不妨猜一下小甲鱼现在心里想的是哪个数字:")guess = int(temp)if guess == 8: print("我草,你是小甲鱼心里的蛔虫吗?") print("哼,猜中了也没有奖励!")else: print("猜猜啦,小甲鱼现在心里想的是8!")print("游戏...
2018-12-11 21:19:00 65
转载 python3.7-初学篇-05
print("I love fishc.com")print(5+3)print("well water"+" river")print("I love fish.com\n" + 8)转载于:https://www.cnblogs.com/liangbannerhulk/p/10105298.html
2018-12-11 21:19:00 83
转载 python3.7-初学篇-04
print ("I will now count my chickens:")print ("Hens"), 25 + 30 / 6print ("Roosters"), 100 - 25 * 3 % 4print ("Now I will count the eggs:")print (3 + 2 + 1 - 5 + 4 % 2 - 1 / 4 + 6)print ("...
2018-12-11 21:18:00 87
转载 python3.7-初学篇-03
# -*- coding: utf-8 -*-# A comment, this is so you can read your program later.# Anything after the # is ignored by python.print ("I could have code like this.") # and the comment after is ign...
2018-12-11 21:17:00 86
转载 python3.7-初学篇-02
# -*- coding: utf-8 -*-print ("Hello World!你好")print ("Hello Again")print ("I like typing this.")print ("This is fun.")print ('Yay! Printing.')print ("I'd much rather you 'not'")print ('I "said" ...
2018-12-11 21:16:00 77
转载 python3.7-初学篇-01
第一个程序print “Hello World!”print“Hello Again”print “I like type”print "This is fun."转载于:https://www.cnblogs.com/liangbannerhulk/p/10105254.html
2018-12-11 21:13:00 66
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人