2019年9月26日

摘要: import requests # import re from bs4 import BeautifulSoup from openpyxl import Workbook import time wb = Workbook() sheet = wb.active count = 1 # 拼接电影爬去地址url for line in range(0, 100, 25): url = f'htt 阅读全文
posted @ 2019-09-26 22:49 康乐12 阅读(79) 评论(0) 推荐(0)

2019年9月25日

摘要: # 猜字符游戏:猜测用户输入的字符是否是9527,限制只能猜3次。 number = 9527 init = 1 # 1 2 3 4 while True: # 若init大于3结束循环 if init > 3: print("猜错3次了,gun吧!") break guess = input("请输入猜测数字:") guess = int(guess) if guess == number: p 阅读全文
posted @ 2019-09-25 20:59 康乐12 阅读(95) 评论(0) 推荐(0)

2019年9月24日

摘要: ''' 用户与程序交互: input() 输入 priut() 输出 username = input('输入提示信息:') ''' username = input('请输入用户名') print(username) password = input('请输入密码') print(password) #如果 #usename == 'tant' True #and:左右两边的条件都为True,否 阅读全文
posted @ 2019-09-24 21:48 康乐12 阅读(112) 评论(0) 推荐(0)

2019年9月23日

摘要: print('安徽财贸职业学院')# 定义变量: # name:变量名 # =: 用于绑定变量名与变量值 # '吕连杰': 变量的值 name = '吕连杰‘ age = 83 sex = 'female' # 调用变量 print(name, age, sex) ''' python8大数据类型: - 整型(整数): int 18 用于存放 身份证ID,年龄.. - 浮点型(小数): float 阅读全文
posted @ 2019-09-23 20:58 康乐12 阅读(79) 评论(0) 推荐(0)

导航