
Lv.1
我有一个游戏,叫做植物大战僵尸,快来玩呀!!!点一个赞吧!
在 来来来,欣赏欣赏帮Scratch的机构的代码! 中回复
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<title>核桃编程</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
<link rel="Shortcut Icon" href='//img.pipacoding.com/icon/icologo32x32.ico'>
<link rel="icon" href='//img.pipacoding.com/icon/icologo32x32.ico'>
<script src="//staticfile.pipacoding.com/js-cookie/latest/js.cookie.min.js"></script>
<script>
function isClientEnvironment() {
return 'ClientType' in window
}
function isDev() {
return window.location.host.indexOf('dev') !== -1
}
function isTesting() {
return window.location.host.indexOf('testing') !== -1
}
</script>
<link rel="stylesheet" href="//g.alicdn.com/de/pri喵player/2.6.0/skins/default/aliplayer-min.css" />
<link rel="stylesheet" href="/main.7081ff779喵d88494624.css">
<!-- [if IE]>
<![endif] -->
<style>
.easemob {
width: 172px;
height: 48px;
border-radius: 24px;
line-height: 44px;
position: fixed;
right: 5%;
bottom: 2%;
font-size: 2喵x;
color: #FFFFFF;
border: 1px #F5A623 solid;
background: url(//img.pipacoding.com/assets/pc/curriculum2.0/yuhang80.png) no-repeat 9px center;
background-size: 36px 36px;
background-color: #F5A623;
/* box-shadow: 0 6px 0px #ca5400; */
z-index: 999;
text-indent: 2.5em;
cursor: pointer;
display: none;
}
.easemob:hover {
color: #FFFFFF;
cursor: pointer;
}
#easemobHint {
display: none;
position: absolute;
right: -12px;
top: -16px;
width: 32px;
height: 32px;
border-radius: 16px;
background-color: #FF4B4B;
text-indent: 0;
text-align: center;
line-height: 32px;
z-index: 1000;
color: #ffffff;
}
</style>
</head>
<body>
<div style="position: fixed;top: -900px;left: -1000px;">
<h1>专业针对7~13岁少儿设计的Scratch编程课</h1>
<p>内容概要:</p>
<p>1. 编程让孩子扮演上帝模式,编写属于自己的小工具和小游戏。</p>
<p>2. 让孩子直通信息学奥赛和生产力编程。</p>
<p>3. 让孩子避开枯燥的语法记忆和编译错误。</p>
<p>最近大火的少儿编程,到底要不要让孩子学?很多家长心中可能存在疑问。</p>
<p>
<strong>时间灵活,有料有趣,价格良心</strong>的核桃少儿编程课,已经来到了第四期,之前的三期,上千名家长的好评。</p>
</div>
<div id="app"></div>
<a class="easemob" id="out" oncontextmenu="menu(event)">
联系老师
<!-- <i id="easemobHint">0</i> -->
</a>
<script>
var easemobHint = document.getElementById('easemobHint');
var out = document.getElementById('out');
var clicktag = true;
var sb_bkx = null;
var sb_bky = null;
var isFirstStatus = '0'
var isLoadTeacher = true
var isLoadData = false
function menu(e) {
e.preventDefault();
};
window.onresize = function () {
out.style['left'] = '';
out.style['top'] = '';
out.style['right'] = '5%';
out.style['bottom'] = '2%';
}
var _mtac = {
"senseQuery": 1
};
var mta = document.createElement("script");
mta.src = "//pingjs.qq.com/h5/stats.js?v2.0.4";
mta.setAttribute("name", "MTAH5");
mta.setAttribute("sid", "50051喵28");
mta.setAttribute("cid", "50051喵30");
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(mta, s);
var navigatorText = navigator.plugins;
var plugins = [];
for (var index = 0; index < navigatorText.length; index++) {
var t = {};
t.name = navigatorText[index].name;
t.description = navigatorText[index].description;
plugins.push(t);
}
</script>
<script src='//kefu.easemob.com/webim/easemob.js'></script>
<script>
window.easemobim = window.easemobim || {};
window.easemobimConfigId = '44a908d8-7c5c-4701-9697-9462f0863e39'
window.setEasemobimInfo = function () {
console.log('easemobim config init')
easemobim.config = {
visitor: {
trueName: Cookies.get("wxname"),
userNickname: Cookies.get("nickname"),
description:
"userID:" +
Cookies.get("userId") +
"; openID:" +
Cookies.get("openid") +
"; 课程ID:" +
(localStorage.getItem("LessonId") ? localStorage.getItem("LessonId") : '未获取到') +
"; 班级ID:" +
localStorage.getItem("ClassId") +
"; 班级名称:" +
localStorage.getItem("ClassName") +
"; 开班时间:" +
localStorage.getItem("classopenTime") +
"; 班主任:" +
localStorage.getItem("counselorName")
},
hide: true,
autoConnect: true,
onmessage: function (message) {
// window.easemobHint.style['display'] = 'block';
// window.easemobHint.innerH喵L++;
},
onready: function () {
sa.track('HuanxinReady')
}
};
}
window.addEventListener('message', function (evt) {
var data = evt.data;
var eventName = data && data.event;
switch (eventName) {
case "showChat":
break;
case "closeChat":
// easemobHint.style['display'] = 'none';
// easemobHint.innerH喵L = 0;
break;
default:
break;
}
});
function initBtn() {
var now = {}
var offset = {
width: out.offsetWidth,
height: out.offsetHeight
}
var w = window.innerWidth
var h = window.innerHeight
window.addEventListener('resize', function(e) {
w = window.innerWidth
h = window.innerHeight
}, false)
out.addEventListener('mousedown', function (e) {
if (e.button === 0) {
now.isMouse = true
now.x = e.clientX
now.px = e.clientX - out.offsetLeft
now.y = e.clientY
now.py = e.clientY - out.offsetTop
}
}, false)
out.addEventListener('click', function (e) {
if (e.button === 0) {
if (now.isMove) {
now.isMove = false
} else {
sa.track('learning_contact_teacher', {
context: {
currentUrl: window.location.href
},
param: {
contactTeacherType: window.location.pathname.indexOf('lessons') !== -1 ? 'lesson' : window.location.pathname.indexOf('courses') !== -1 ? 'course' : window.location.pathname.indexOf('works') !== -1 ? 'homework' : ''
}
})
easemobim.bind({
configId: window.easemobimConfigId
});
}
}
}, false)
window.addEventListener('mousemove', function (e) {
if (now.isMouse) {
if ((e.clientX - now.x) > 5 || (now.x - 5) > e.clientX || (e.clientY - now.y) > 5 || (now.y - 5) > e.clientY) {
now.isMove = true
var x = e.clientX - now.px
var y = e.clientY - now.py
// 元素拖拽边缘检测
if (x <= 0) x = 0
if (y <= 0) y = 0
if (x >= (w - offset.width)) x = w - offset.width
if (y >= (h - offset.height)) y = h - offset.height
out.style.top = y + 'px'
out.style.left = x + 'px'
}
}
}, false)
window.addEventListener('mouseup', function (e) {
if (now.isMouse) {
now.x = null
now.px = null
now.y = null
now.py = null
now.isMouse = false
}
}, false)
}
</script>
<script type="text/javascript" src="/vendors.7081ff779喵d88494624.js"></script>
<script type="text/javascript" src="/main.7081ff779喵d88494624.js"></script>
<!-- <script src="//player.polyv.net/script/player.js"></script> -->
<script src="//staticfile.pipacoding.com/js/polyv.20181206.player.js"></script>
<script charset="utf-8" type="text/javascript" src="//g.alicdn.com/de/prismplayer/2.6.0/aliplayer-min.js"></script>
</body>
</html>
2019-07-26T12:56:23 点赞:0
在 来来来,欣赏欣赏帮Scratch的机构的代码! 中回复
<iframe src ="https://ide.codemao.cn/we/32229615"></iframe>
2019-07-26T13:06:56 点赞:0
在 快说!你最喜欢的Scratch作品是哪个?敢不敢大大方方分享粗来!? 中回复
技术喵,搬运过来作品怎么有点“变质”了?
我搬运的网址:https://shequ.codemao.cn/work/32637379
原作品网站:https://scratch.mit.edu/projects/322285742/
2019-08-03T13:17:55 点赞:1
在 急回复 急回复 关于python和pygame 中回复
python 3.5.2 下载:链接:https://pan.喵/s/1uTQlq9ajabGpuYVaE24vQg 密码:oj8e
按住windows键不动,按r,在弹出的窗口中输入pip install pygame(要先安装python,输入此命令后自动安装pygame1.9.2)
2019-08-04T11:34:31 点赞:0
在 【Python作品分享】正方形 中回复
喵
鸡你实在太美
鸡你是太美
喵
实在是太美鸡你
鸡你 实在是太美鸡你 美
鸡你 实在是太美鸡美 太美
鸡你 实在是太美鸡美 太美
鸡你 实在是太美鸡美 太美
鸡你 鸡你实在是美太美 美蓝球球
鸡 鸡 鸡你实在是太美 篮球篮球球
鸡 喵裆鸡太啊 蓝篮球
喵裆裆鸡美
鸡你美裆 裆鸡美
鸡太美 鸡太美
鸡美 鸡美
鸡美 鸡美
鸡美 鸡美
鸡太 鸡太
金 猴 太美
皮 鞋 皮鞋金猴
金光 金光 大道
大道
2019-08-04T11:39:19 点赞:0
在 【Python作品分享】控制绿方块【作品秀】 中回复
各位:本代码出乱码了,请访问新链接:https://shequ.codemao.cn/community/187059
2019-08-06T17:20:41 点赞:0
在 【求助】谁有codemao库的教程 中回复
Microsoft Windows [版本 10.0.17763.253] (c) 2018 Microsoft Corporation。保留所有权利。 C:\Users\q8812>pip install codemao Collecting codemao Downloading https://files.pythonhosted.org/packages/88/ba/24a182e353a84028d4afe4ee8e2551e9c27b4fb4939819dbb772c277e5c8/Codemao-0.0.17-py3-none-any.whl (19.5MB) 1% |▌ | 296kB 148kB/s eta 0:02:10
2019-08-06T17:53:46 点赞:0
在 【求助】谁有codemao库的教程 中回复
Microsoft Windows [版本 10.0.17763.253]
(c) 2018 Microsoft Corporation。保留所有权利。
C:\Users\q8812>pip install codemao
Collecting codemao
Downloading https://files.pythonhosted.org/packages/88/ba/24a182e353a84028d4afe4ee8e2551e9c27b4fb4939819dbb772c277e5c8/Codemao-0.0.17-py3-none-any.whl (19.5MB)
1% |▌ | 296kB 148kB/s eta 0:02:10
2019-08-06T17:54:10 点赞:0
在 关于python 中回复
python是一种解释性语言,因语言简洁,操作简单等方面深受大家的喜爱,非常适合新手编程。不仅如此,python还有丰富的第三方库,能造成更加成熟的作品。而且python是开源的,可供大家学习
2019-08-11T19:53:03 点赞:0
在 【Python作品分享】炫彩文字【作品秀】 中回复
送你一个游戏
#coding:utf-8
import pygame
from pygame.locals import*
bl = list()
pygame.init()
pygame.display.set_caption('方块闯关')
canvas = pygame.display.set_mode((1000,600))
u1 = pygame.font.Font(None,80)
No = 1
bks = 0
x,y,yu,yu2,yu3 = 0,420,0,0,0
text,duo,ui = pygame.font.SysFont('simhei',30),1,y-170
while 1:
canvas.fill((255,255,255))
pygame.draw.rect(canvas,(0,0,0),(0,450,1000,150))
if No > 3:
No = 1
if No == 2:
pygame.draw.rect(canvas,(255,255,255),(334,450,333,150))
if x >= 334 and x < 637 and y >= 420:
yu3 = -1
duo = 0
if y == 630:
x,duo,yu3,y = 0,1,0,420
elif No == 3:
pygame.draw.rect(canvas,(255,0,0),(490,240,20,210))
pygame.draw.rect(canvas,(0,255,0),(300,350,50,20))
if x >= 460 and x <= 510 and y >= 210 and y <= 450:
x = 0
if y == 370 and x >= 270 and x<= 350:
yu3 = -1
elif y == 320 and x >= 270 and x<= 350 and yu3 == -1:
yu3,bks = 0,1
elif y == 320 and x < 270 and bks or y == 320 and x > 350 and bks:
yu3,bks = -1,0
if x > 270 and x < 301 and y > 320 and y < 370:
duo = 0
elif x > 319 and x < 350 and y > 320 and y < 370:
duo = 0
else:
duo = 1
pygame.draw.rect(canvas,(0,0,255),(x,y,30,30))
canvas.blit(text.render('关卡'+str(No),1,(0,0,0)),(00,0))
for event in pygame.event.get():
if event.type == QUIT:
exit()
if event.type == KEYDOWN:
if event.key == K_LEFT:
yu = 1
if event.key == K_RIGHT:
yu2 = 1
if event.key == K_SPACE and yu3 == 0:
yu3 = 1
ui = y-158
elif event.type == 3:
if event.key == K_LEFT:
yu = 0
if event.key == K_RIGHT:
yu2 = 0
if yu and x!=0 and duo:
x -= 1
if yu2 and duo:
x += 1
if x == 970:
No += 1
x = 0
y -= yu3
if y == ui:
yu3 = -1
elif y == 420:
yu3 = 0
pygame.display.update()
pygame.time.delay(1)2019-08-11T19:56:24 点赞:0
在 【Python作品分享】方块闯关 中回复
各位:应为代码太多了,请看一下代码:
#coding:utf-8 import pygame from pygame.locals import* pygame.init() pygame.display.set_caption('方块闯关') canvas = pygame.display.set_mode((1000,600)) u1 = pygame.font.Font(None,80) No,y2 = 1,240 No5,No52 = 0,0 bks,bks2 = 0,0 height = 210 x,y,yu,yu2,yu3 = 0,420,0,0,0 text,duo,ui = pygame.font.SysFont('simhei',30),1,y-170 x2,y3 = 970,420 sd,sd2 = 0,0 while 1: canvas.fi喵)) pygame.draw.rect(canvas,(0,0,0),(0,450,1000,150)) pygame.draw.rect(canvas,(255,174,201),(x2,y3,30,30)) if No > 5: No = 1 x2,y3,height = 970,420,210 if No == 2: pygame.draw.rect(canvas,(255,255,255),(334,450,333,150)) if x >= 334and x < 637and y >= 420: yu3 = -1 duo = 0 if y == 630: x,duo,yu3,y = 0,1,0,420 elif No == 3: pygame.draw.rect(canvas,(255,0,0),(490,240,20,210)) pygame.draw.rect(canvas,(0,255,0),(300,350,50,20)) if x >= 460and x <= 510and y >= 210and y <= 450: x = 0 if y == 370and x >= 270and x<= 350: yu3 = -1 elif y == 320and x >= 270and x<= 350and yu3 == -1: yu3,bks = 0,1 elif y == 320and x < 270and bks or y == 320and x > 350and bks: yu3,bks = -1,0 if x > 270and x < 301and y > 320and y < 370: duo = 0 elif x > 319and x < 350and y > 320and y < 370: duo = 0 else: duo = 1 elif No == 4: y2 = 450-height pygame.draw.rect(canvas,(255,0,0),(490,y2,20,height)) if height == 210: bks = 1 elif height == 67: bks = -1 if x < 510and x > 460and y < y2 +height and y > y2-30: x = 0 height -= bks elif No == 5: x2,y3 = 500,50 pygame.draw.rect(canvas,(sd,255,sd),(300,350,50,20)) pygame.draw.rect(canvas,(sd2,255,sd2),(400,249,50,20)) if y == 269and x >= 370and x<= 450and sd2-255: yu3 = -1 elif y == 219and x >= 370and x<= 450and yu3 == -1: yu3,bks2 = 0,1 elif y == 219and x < 370and bks2 or y == 219and x > 450and bks2: yu3,bks2 = -1,0 if x > 370and x < 401and y > 219and y < 269and sd2-255: duo = 0 elif x > 419and x < 450and y > 219and y < 269and sd2-255: duo = 0 elif x > 270and x < 301and y > 320and y < 370: duo = 0 elif x > 319and x < 350and y > 320and y < 370: duo = 0 else: duo = 1 if y == 370and x >= 270and x<= 350: yu3 = -1 elif y == 320and x >= 270and x<= 350and yu3 == -1: yu3,bks = 0,1 elif y == 320and x < 270and bks or y == 320and x > 350and bks: yu3,bks = -1,0 if y == 320and x >= 270and x<= 350and sd < 255andnot No5: No5 = 1 if No5 and sd-255: sd += 1 else: sd,No5 = 0,0 if sd == 255and y == 320and x >= 270and x<= 350: yu3 = -1 if y == 219and x >= 370and x<= 450and sd2 < 255andnot No52: No52 = 1 if No52 and sd2-255: sd2 += 1 else: sd2 = 0 No52 = 0 if sd2 == 255and y == 219and x >= 370and x<= 450: yu3 = -1 if bks != 0and y != 320: bks = 0 pygame.draw.rect(canvas,(0,0,255),(x,y,30,30)) canvas.blit(text.render('关卡'+str(No),1,(0,0,0)),(00,0)) for event in pygame.event.get(): if event.type == QUIT: exit() if event.type == KEYDOWN: if event.key == K_LEFT: yu = 1 if event.key == K_RIGHT: yu2 = 1 if event.key == K_SPACE and yu3 == 0: yu3 = 1 ui = y-158 elif event.type == 3: if event.key == K_LEFT: yu = 0 if event.key == K_RIGHT: yu2 = 0 if yu and x!=0and duo: x -= 1 if yu2 and duo and x != 970: x += 1 if x>x2-30and x<x2+30and y>y3-30and y<y3+30: No += 1 x = 0 y -= yu3 if y == ui: yu3 = -1 elif y == 420: yu3 = 0 pygame.display.update() pygame.time.delay(1)2019-08-12T13:52:40 点赞:0