图形化编程娱乐于教,Kittenblock实例,创建自己的模块

跟很多学生聊过,很多学生不是不努力,只是找不到感觉。有一点不可否认,同样在一个教室上课,同样是一个老师讲授,学习效果迥然不同。关键的问题在于,带入感,我能给出的建议,就是咬咬牙,坚持住,没有学不会的知识。会陆续分享图形化编程的经验,希望能够做成一个专题。如果您觉得有用,就给点个赞吧。涉及的软件包括scratch3.0 (.sb3)、Python、Kittenblock。

程序解读:创建自己的模块

知识点:角色,选择,自制积木

涉及的软件:scratch3.0 (.sb3)、Python、Kittenblock。

程序效果图!

 

 

 

 

程序代码!

# -*- coding: utf-8 -*-

import _env, time, random

from kblock import *

Abby = Sprite("Abby")

 

x = 0

 

def 我的模块():

  Abby.motion_turnright(15)

 

 

 

if Abby.sensing_touchingobject("_mouse_"):

  我的模块()

else:

  Abby.motion_movesteps(10)

  Abby.motion_ifonedgebounce()

  Abby.motion_setrotationstyle("left-right")

posted @ 2020-03-03 11:05  创智养成教育  阅读(385)  评论(0编辑  收藏  举报