The numbers in these commands control how the sprite follows the command, like how long to wait, or how far to go.
Change the number in .wait() to 1.
Change the number in the .move_right() command to 400.
First, we change the number of the seconds that the stage stops and waits.
Second, we move the sprite 400 pixelsto the right.
,
Submitted!
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(2)
sprite.move_right(50)
t = codesters.Teacher()
waits = t.get_parameters_for_function('wait')
moves = t.get_parameters_for_function('move_right')
try:
tval1 = int(waits[0][0])
except:
tval1 = "DNE"
try:
tval2 = int(moves[0][0])
except:
tval2 = "DNE"
t1 = TestObjective()
t1.add_success(tval1 == 1, "Great job!")
t1.add_failure(tval1 == "DNE", "Oops! Did you delete your Wait command?")
t1.add_failure(tval1 ==2, "Did you change the Wait parameter?")
t1.add_creative(tval1 > 1 and tval1 != "DNE", "That's a long time to wait!")
t1.add_creative(tval1 < 1, "That's a short time to wait!")
t2 = TestObjective()
t2.add_success(tval2 == 400, "Great job!")
t2.add_failure(tval2 == "DNE", "Oops! Did you delete the Move Right command?")
t2.add_failure(tval2 == 50, "Did you change the number in your Move Right command?")
t2.add_creative(tval2 != 50 and tval2 < 400, "That's a shorter distance to move your sprite. Creative choice!")
t2.add_creative(tval2 > 400, "That's a bigger distance to move your Sprite!")
tester = TestManager()
tester.add_test_list([t1, t2])
tester.run_tests()
tester.display_first_feedback()
Try the following steps to connect to your Micro:bit:
1. You may need to reload this page and try your program again.
2. Try disconnecting and reconnecting your Micro:bit. Then reload the page and run your program again.
3. If you are still having problems your Micro:bit may have an old
firmware version that is incompatible with Codesters.
To update the firmware follow these instructions from Micro:bit
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.