爱心传大家,本着有资源就下,下了也不看的精神,顶一个
哈哈。。。。。。
satdveg nbsvfs
:big改天Python写个自动下载指定网页的图片的出来,相当实用~~~运营必备啊
看看源代码是什么
# 1 - Import library
import pygame
from pygame.locals import *
# 2 - Initialize the game
pygame.init()
width, height = 640, 480
screen=pygame.display.set_mode((width, height))
# 3 - Load images
player = pygame.image.load("resources/images/dude.png")
# 4 - keep looping through
while 1:
# 5 - clear the screen before drawing it again
screen.fill(0)
# 6 - draw the screen elements
screen.blit(player, (100,100))
# 7 - update the screen
pygame.display.flip()
# 8 - loop through the events
for event in pygame.event.get():
# check if the event is the X button
if event.type==pygame.QUIT:
# if it is quit the game
pygame.quit()
exit(0)
表示还不懂怎么写退出。。。
只是看看那
这种小游戏最适合我这种新手{:1_1:}
感谢分享学习学习:big:big
这个必须要看看那啊
import random
secret = random.randint(1,10)
print('--------第一个python程序--------')
temp = input("猜猜我心中想的数字:")
guess = int(temp)
count = 0
while guess != secret:
if count == 2:
print("三次机会用完了,很遗憾你还是没有猜中。")
break
if guess > secret:
print("猜错了,大了")
else:
print("猜错了,小了")
count = count + 1
print('再给你一次机会:')
temp = input()
guess = int(temp)
if guess == secret:
print("猜对了哎,但是猜对也没有奖励!")
print('游戏结束^_^!')
exe要怎么弄。。
谢谢分享
学习来了!
哎哟,不错哟,我能说我是来混鱼币呢吗
膜拜
還不錯說
不過區間有點大
只有三次好像有點少
支持你
我服!