Lv.1
一个被遗忘的函数
签名:玩/做游戏 (Ġ̴̛̰̤̲̾̄̚Ả̶̰͖̺͙̜̠ͫ͆̀͛ͯ̈́͗̄̀̉͑̌ͬ̚͝S̴̷̩͈̪̩̲̣̫̱̈͂̊ͯ͒̓ͧ͆́̚͜T̀ͤ̀̂̌͒ͩ̚͏҉͏̡̺̯͖̳̗̫̼̹̗͖͔̦̻̰͟E̷̛͉̤̜̬̫̩̱̮͍͕̜̪̘̮̠̟̳̎̂ͨ̅͘͠Ŕ̢̞͇͉̱͉̖̰̩̩̞̤̩͈͔̘̗̪͖̗̿̍̒͟͜Ġ̴̛̰̤̲̾̄̚Ả̶̰͖̺͙̜̠ͫ͆̀͛ͯ̈́͗̄̀̉͑̌ͬ̚͝)
在 【Python作品分享】贪吃蛇 中回复
妈呀,可算遇到个用pygame得了:
import pygame
screen = pygane.display.set_mode([800,600])
WHITE = (255,255,255)
font = pygame.font.SysFont("Times",50)
string = "0"
BLACK = (0,0,0)
keep = True
while keep:
for event in pygame.event.get():
if event.type == pygame.QUIT:
keep = Fales
if event.type == pygame.KEYDOWN:
string = str(event.key)
screen.fill(BLACK)
text = font.render(string,True,WHITE)
text_rect = text_get_rect()
text_rect.centerx = screen.get_rect().centerx
text_rect.y = 300
screen.bilt(text,text_rect)
ptgame.quit()2019-10-03T23:24:02 点赞:0
在 牛顿摆怎么做? 中回复
喵
鸡你实在太美
鸡你是太美
喵
实在是太美鸡你
鸡你 实在是太美鸡你 美
鸡你 实在是太美鸡美 太美
鸡你 实在是太美鸡美 太美
鸡你 实在是太美鸡美 太美
鸡你 鸡你实在是美太美 美蓝球球
鸡 鸡 鸡你实在是太美 篮球篮球球
鸡 喵裆鸡太啊 蓝篮球
喵裆裆鸡美
鸡你美裆 裆鸡美
鸡太美 鸡太美
鸡美 鸡美
鸡美 鸡美
鸡美 鸡美
鸡太 鸡太
金 猴 金猴
皮 鞋 皮鞋金猴
金光 金光 大道
2019-10-05T21:44:26 点赞:0
在 【Python作品分享】反弹球【作品秀】 中回复
timer,speedx,speedy,keep_going.是不是Bryson Payne编的书?
2019-10-05T23:03:46 点赞:0
在 【代码岛3.0】第二喵测体验《逃离巨人屋》正式开启! 中回复
1.飞翔的菜刀 2.水上菜叶(也许吧) 3.喷发的仙人球 4大冰箱.I可乐,II盘子(也许吧) 5.撞撞球I 6.顺便搭车 7.撞撞球II 8.大鱼缸
9.飞镖酷跑0. 10.超级玛丽
2019-10-19T22:31:54 点赞:0
在 正在为py封装exe而苦恼的小伙伴们快过来看看!!!!!!!!!@活动喵姐姐 @猴急 求加精!!!! 中回复
我用pygame库,使用了外链图像素材,它却说“Falied to execute script (文件名机密,不外传)”。
2019-12-28T21:45:15 点赞:0
在 【Python作品分享】秋季考试绘制图形 中回复
来啊,快活啊,互相伤害啊:
import pygame
import random
import sys
pygame.init()
screen = pygame.display.set_mode([800, 600])
pygame.display.set_caption("Potato Cat")
keepGoing = True
timer = pygame.time.Clock()
class maincat:
def __init__(self):
self.image = pygame.transform.喵oothscale(
pygame.image.load(r"asstes\image\cat\1.png"), (32, 32))
self.x = 100
self.y = 50
self.jump = 0
def catUpdate(self):
self.jump += 0.001
self.y += self.jump
myCat = maincat()
pygame.display.set_icon(myCat.image)
while keepGoing:
for event in pygame.event.get():
if event.type == pygame.QUIT:
keepGoing = False
if event.type == pygame.MOUSEBUTTONDOWN:
if event.button == 1:
myCat.jump = -0.3
screen.fill((100, 100, 155))
screen.blit(myCat.image, (myCat.x, myCat.y))
myCat.catUpdate()
pygame.display.update()
# timer.tick(60)
pygame.quit()
2019-12-28T22:40:56 点赞:0
在 [直接排序] 中回复
打错了:
function sort(int[] arr){
int[] ay;
int num = ay[0];
for (let i=0;i<=arr.length-1;i++){
for (let j=0;j<=arr/length-1;j++){
if(arr[j]<=num){
num=arr.pop(j);
}
}
ay[i]=num;
}
return ay;
}2020-01-21T15:10:31 点赞:0
在 【Python作品分享】hello【作品秀】 中回复
name = input("What your name?")
print(len(name))
try:
age = int(input(How old are you?))
expect ValueError:
print("哼!不理你了!")
raise NameErro("你个喵,你个喵")
else:
print("Hello " + name + ",you are " + str(age) + ".")
2020-01-28T19:07:43 点赞:0
在 【Python作品分享】hello【作品秀】 中回复
应是:
应是:
name = input("What your name?")
print(len(name))
try:
age = int(input(How old are you?))
expect ValueError:
print("哼!不理你了!")
raise NameError("你个傻 子,你个傻 子")
else:
print("Hello " + name + ",you are " + str(age) + ".")2020-01-28T19:09:12 点赞:0
在 【你问我答】你们有关C++,都知道多少? 中回复
#include <iostream>
#include <string.h>
using namespeac std
class preson
{
public:
preson(char[],int);
~preson();
eat(char[]);
sleep(double time);
protected:
char *name[];
int *age;
}
preson::preson(char *n[],int *a)
{
strcpy(name,n);
age = a;
}
preson::~preson()
{
cout <<"I'm dead!";
strcpy(name,NULL);
age = -1;
}
preson::eat(char food[])
{
cout <<"I'm eating " <<&food <<"now";
}
preson::sleep(int time)
{
cout <<"I'm sleeped " <<time <<"minnuent";
}2020-01-28T22:50:19 点赞:0
在 【海龟APP·版本更新】Codemao库上线,测测你的外貌能藏得住年龄吗? 中回复
import easygui
easygui.msgbox("函数带你飞")
from tkinter import *
root = Tk()
lab = Label(root,text="函数带你飞")
lab.pack()
mainloop()2020-02-05T19:25:16 点赞:0
在 【Python作品分享】幸运数【作品秀】 中回复
while循环了解一下
import random
num = random.randint(1,100)
print("快来猜数字吧!")
thenum = None
while thenum != num:
thenum = input("输入你的猜测:")
if themun > num:
print(thenum,"大了")
elif thenum < num:
print(thenum,"小了")
else:
print(thenum,"对了")
break2020-02-05T20:06:22 点赞:0
在 【Python作品分享】shell【作品秀】 中回复
code = None
class Errorr(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return repr(self.value)
while True:
code = input(">>>")
try:
exec(code)
expect:
raise Errorr("代码有误。")
finally:
continue2020-02-08T15:47:59 点赞:0