自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 收藏
  • 关注

原创 猜猜猜

print("You can't win this game") #你不可能赢这个游戏 n = int(input("Between 1 and 10 type a number(integer)")) #在1到10之间写一个数字(整数) print("Your answer isn't integer or not between 1 and 10,this game is over.") #你的回答不是整数或者1到10之间的一个数字(整数) while True: n = input("我现在心里想的

2021-01-07 22:17:06 44

原创 九九乘法表

# 左下三角九九乘法表 for row in range(1,10): #打印行 for col in range(1,row+1): #打印列 print("{0}*{1}={2:2d}".format(row,col,row*col),end=" ") #这里是用format函数进行格式化输出控制,{2:2d}是给{2}这个位置两倍的空间,对齐乘法表 #同时end是print函数内置方法,设置end=""print就不会进行换行操作 print(" ") #这里是用pri

2021-01-07 21:57:36 47

原创 疯狂购物

shop_car = []#用来存放购买的商品 goods = { 1:['手机',2500], 2:['电脑',3500], 3:['自行车',4500], 4:['宝马',20000] }#商品列表 while True: salary = input("你有多少钱:") # 输入有多少钱 if salary.isdigit(): # 判断是否为整数 salary = int(salary) # 将字符串转化为整数 print("是否要买东西:") fla

2021-01-07 21:55:40 77

原创 飞机大战

import pygame import random import math pygame.init() # 初始化 # 音效 pygame.mixer.music.load('123.mp3') # 导入背景音乐 pygame.mixer.music.set_volume(0.1) # 音量 pygame.mixer.music.play(loops=-1) # 循环播放 # 击中音效 bao_sound = pygame.mixer.Sound('jz.mp3') # 1显示背景 bg

2021-01-07 21:45:12 88

原创 猜拳

#运行随机库 import random #设置循环 while True: #设置player的输入 player = input("请输入:\n剪刀(0)\n石头(1)\n布(2)") #把player输入的值规定为整数 player = int(player) #设置电脑随机输入0-2之间的整数 computer = random.randint(0,2) #猜拳逻辑 if ((player == 0 and computer == 2)

2021-01-06 21:50:25 76

原创 一个对象

class parent: _play = "打游戏" def __init__(self,name,sex): self.name = name self.sex = sex def study(self): print("人一生下来就会学习") class son(parent):#继承 子类会继承父类的所有属性和方法 def study1(self): print("儿子特别喜欢学习") son1 = so

2021-01-06 21:39:48 102 1

原创 对象配对

from random import random, choices, randint Candidate = [] for i in range(0,40): nametext = '''王怡君、杨琬翰、杜伟来、谢胜瑞、强琳任、白可欣、李之升、黄世豪、邱育治、刘秀娟、林秀佳、周筱婷、赵志伟、苏庆昆、蒋明哲、林智竹、张秀乔、陈盈韦、林威友、张维梅、林诗康、刘美玲、简少霞、葛彦廷、蔡原士、白家慧、黄心怡、王木盛、施纬原、张家智、李彦志、陈伟诚、苏建添、司俊宏、陈品旺、李慧君、傅欣怡、蔡宥木、何怡君、林

2021-01-06 21:38:11 99

原创 表白小程序

from turtle import * from time import sleep def go_to(x, y): up() goto(x, y) down() def big_Circle(size): #函数用于绘制心的大圆 speed(1) for i in range(150): forward(size) right(0.3) def small_Circle(size): #函数用于绘制心的小圆 speed

2021-01-06 21:29:53 159

原创 小黑屋

import random import time EVENT = ["Bobby","沼泽","xxx"]#事件列表 SOURCE = [" 火柴","牛肉","衣服"]#资源列表 SKILL = ["降龙十八掌","打狗棒法","九阴白骨爪","九阴真经","如来神掌"]#技能列表 def Init():#初始人物 person = {"HP":100, "Hungry":100, "IQ":100, "skill":"", "火柴":1

2021-01-06 21:26:24 53

原创 字典攻击

import itertools # 迭代器 import datetime import hashlib import time def generatelibary(library, length=8): libararys = itertools.product(library,repeat=length) dic = open("paswordlirbarys.txt","w",encoding='utf-8')#写模式打开文件 for i in libararys:

2021-01-06 20:32:57 328

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除