POPCORN

Code Runner Challenge

POPCORN

View IPYNB Source
# CODE_RUNNER: POPCORN
stars = 8
checkpoint_stars = stars
stars = stars + 4
print(stars)
print(checkpoint_stars)
Lines: 1 Characters: 0
Output
Click "Run" in code control panel to see output ...

MCQ

HOMEWORK

Code Runner Challenge

HOMEWORK HACK

View IPYNB Source
# CODE_RUNNER: HOMEWORK HACK
# Your UESL prototype goes here.
game_name = "UESL Star Dash"
reduced_motion = True

level_one_stars = 12
level_two_stars = 18
level_three_stars = 10

stored_total = level_one_stars + level_two_stars + level_three_stars

print("Game:", game_name)
print("Reduced motion:", reduced_motion)
print("Original total:", stored_total)

bonus = 5
level_two_stars = level_two_stars + bonus

print("Stored total after bonus:", stored_total)

updated_total = level_one_stars + level_two_stars + level_three_stars
print("Updated total:", updated_total)
Lines: 1 Characters: 0
Output
Click "Run" in code control panel to see output ...

Tests

Code Runner Challenge

TEST 1

View IPYNB Source
# CODE_RUNNER: TEST 1
level_one_stars = 12
level_two_stars = 18
level_three_stars = 10

stored_total = level_one_stars + level_two_stars + level_three_stars

bonus = 5
level_two_stars = level_two_stars + bonus

updated_total = level_one_stars + level_two_stars + level_three_stars

print("Original total:", stored_total)
print("Stored total after bonus:", stored_total)
print("Updated total:", updated_total)
Lines: 1 Characters: 0
Output
Click "Run" in code control panel to see output ...

Code Runner Challenge

TEST 2

View IPYNB Source
# CODE_RUNNER: TEST 2
level_one_stars = 12
level_two_stars = 18
level_three_stars = 10

stored_total = level_one_stars + level_two_stars + level_three_stars

bonus = 0
level_two_stars = level_two_stars + bonus

updated_total = level_one_stars + level_two_stars + level_three_stars

print("Original total:", stored_total)
print("Stored total after bonus:", stored_total)
print("Updated total:", updated_total)
Lines: 1 Characters: 0
Output
Click "Run" in code control panel to see output ...

Design Thinking