Commit 98f2d791 by BellCodeEditor

save project

parent de8d61a1
tuple1 = (100,200,300)
x,y,z = tuple1
print('x的值为:',X)
print('的值为:',y)
num = 0
\ No newline at end of file
import pygame
from pygame import locals
pygame.init()
screen = pygame.display.set_mode((640,480))
pygame.mixer.music.load('歌曲4.ogg')
pygame.mixer.music.play()
while Ture:
for event in pygame event.get():
if event.tyte == locals.QUIT
exit()
import csv
data = [["语文,"数学","英语"],["小笔",98,99,92],["aa",95,91,95]
with open("test.csv","w",encoding="utf-8") as csvfile:
writerc = csv.writer(csvfile)
writerc.writerow(data)
from random import randint
a = randint(2,5)
print(a)
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
import pygame
from pygame import locals
# 初始化pygame,为使用硬件做准备
pygame.init()
# 创建一个窗口
screen = pygame.display.set_mode((660, 480))
# 背景
background = pygame.image.load('bg.png')
right = pygame.image.load('right.png')
food = pygame.image.load('apple.png')
body = pygame.image.load('body.png')
left = pygame.image load('left.png')
up = pygame.image load('up.png')
down = pygame.image load('down.png')
x,y =240,120
position[(180,90),(180,120),(210,120),(240,120)]
seteading = "right"
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
# 接收到退出事件后退出程序
exit()
# 将背景图画上去
screen.blit(background, (0, 0))
# 将贪吃蛇画上去
screen.blit(right, (240, 120))
# 将贪吃蛇的身体画上去
#screen.blit(body, (210, 120))
#screen.blit(body, (180, 120))
#screen.blit(body, (180, 90))
position[(180,90),(180,120),(210,120),(240,120)]
for i in range(len(position)-1):
print(position[i])
# 将果实画上去
screen.blit(food, (360, 300))
# 刷新画面
pygame.display.update()
\ No newline at end of file
import wordcloud
from PIT import Image
with open('python二级考试大纲。txt',encoding='utf-8' as f:
text = f.read()
w = wordcloud.WordCloud(background_color="white",font_path='SimHei.ttf')
ing = Image.open("bell.png")
w.generate("贝尔编程")
w.to_file("mycloud.png")
This source diff could not be displayed because it is too large. You can view the blob instead.
394521394521
394521394521
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment