Graphical programming and entertainment in teaching, Kittenblock instance, the effect of music stamps picture

Like many students talked to a lot of students are not hard, but could not find the feeling. One thing is undeniable, the same class in a classroom, a teacher is also teaching, learning different. The key question is, bring a sense of advice I can give is to bite the bullet, hold on, no knowledge will not. We will continue to share experiences of graphical programming, hoping to make a topic. If you find useful, give a point like it. Software covered include scratch3.0 (.sb3), Python, Kittenblock.

Reading program: the effect of the stamp picture music

Knowledge Point: stamp effect

Software involved: scratch3.0 (.sb3), Python, Kittenblock.

Program renderings!

 

 

 

 

Role Code:

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

import _env, time, random

from kblock import *

01f931559e7c8132f875370ae98879 = Sprite("01f931559e7c8132f875370ae98879")#角色

 

x = 0

 

 

while True: # Loop Effects

  01f931559e7c8132f875370ae98879.looks_nextcostume () # next shape

  time.sleep (1) # 1 second delay

  01f931559e7c8132f875370ae98879.pen_stamp () # Stamp Tool

Background Code

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

import _env, time, random

from kblock import *

01f931559e7c8132f875370ae98879 = Sprite("01f931559e7c8132f875370ae98879")

 

x = 0

 

 

while True:

  Stage.looks_nextbackdrop () at a stage background #

  time.sleep (0.2) # 0.2 seconds delay

Stage.sound_playuntildone ( "Pang Long - Two Butterflies (square dance)") # Music Stage

Guess you like

Origin www.cnblogs.com/ztg1/p/12376446.html
Recommended