########################################################################
# PLACE LIST CREATIONS HERE #
########################################################################
stage_list = ["moon", "mars", "jupiter", "pluto", "space", "city"]
########################################################################
# PLACE ALL OTHER CODE BELOW THIS #
########################################################################
stage_image = stage_list[0]
stage.set_background(stage_image)
t = codesters.Teacher()
try:
tval1 = t.find_text('stage_image')[0][1].replace(' ' , '')
except:
tval1 = "DNE"
t1 = TestObjective()
t1.add_success('stage_image=stage_list' in tval1, "Great job!")
t1.add_failure(tval1 == "DNE", "Oops! Did you delete your Get Value at Index block?")
t1.add_failure('my_list' in tval1, "Oops! Did you change the list name to stage_list?")
t1.add_failure('[0]' in tval1, "Make sure you change the number between the brackets to try different indexes!")
tester = TestManager()
tester.add_test_list([t1])
tester.run_tests()
tester.display_first_feedback()
-
Run Code
-
Activity Submitted!
Submit Work
-
Next Activity
-
Stop Running Code
-
Show Chart
-
Show Console
-
Reset Code Editor
-
Codesters How To (opens in a new tab)