Elige una para tu figura. Esto puede colocarla en otro lugar o simplemente hacer mover tu figura.
Utiliza Set Text para cambiar tu texto en la pantalla a la nueva frase que describe tu nueva escena.
Añade un comando Wait desde .
To navigate the page using the TAB key, first press ESC to exit the code editor.
stage.set_background("park")
sprite = codesters.Sprite("person3")
sprite.glide_to(-100, 50)
# text = codesters.Text("text", x, y, "color")
text = codesters.Text("I went to the park!", 0, -200, "blue")
stage.wait(1)
sprite.move_right(400)
transition1 = sprite.ask("Choose a transition from the sequence category.")
text.set_text(transition1)
sprite.move_left(200)
stage.set_background("underwater")
text.set_text("I like turtles.")
stage.wait(2)
transition2 = sprite.ask("Enter another word")
text.set_text(transition2)
stage.set_background("jupiter")
text.set_text("Then I was in space!")
stage.wait(2)
transition3 = sprite.ask("Enter yet another word")
text.set_text(transition3)
t = codesters.Teacher()
try:
params = t.find_function('set_text')
tval1 = params[5][1].lower()
except:
tval1 = "DNE"
try:
params2 = t.find_function('wait')
tval2 = params2[3][1]
except:
tval2 = "DNE"
try:
params3 = t.find_function("set_background")
tval3 = params3[3][1]
except:
tval3 = "DNE"
t1 = TestObjective()
t1.add_success(tval1 != "DNE" and "hello codesters" not in tval1, "Great job!")
t1.add_failure(tval1 == "DNE", "Did you add a Set Text command?")
t1.add_failure("hello codesters" in tval1, "Did you change the text to describe your new scene?")
t2 = TestObjective()
t2.add_success(tval2 != "DNE", "Great job!")
t2.add_failure(tval2 == "DNE", "Did you add a Wait command?")
t3 = TestObjective()
t3.add_success(tval3 != "DNE", "Great job!")
t3.add_failure(tval3 == "DNE", "Did you add a set background command?")
tester = TestManager()
tester.add_test_list([t3, t1, t2])
tester.run_tests()
tester.display_first_feedback()
Are you already running a Codesters project in another tab or window?
Micro:bit can only connect to one web page at a time.
Try stopping other Codesters projects or closing
other tabs or windows that may be using your Micro:bit.
If that doesn't fix the problem try disconnecting your Micro:bit,
reloading this page, and reconnecting your Micro:bit.