debugging Magic Quiz

Test your knowledge of debugging by answering this quiz!
Question 1 of 1

Given the following code block in a file called cool.py:

cool_value = 'SkillMagic'

def set_cool_value(new_cool_value):
  cool_value = new_cool_value
  print(cool_value)

def get_cool_value():
  print(cool_value)

Suppose you ran the following code in your Python console:

from cool import set_cool_value, get_cool_value
set_cool_value('UnskilledScience')
get_cool_value()

What would you see printed on the console?


  • SkillMagic, then UnskilledScience
  • UnskilledScience, then UnskilledScience
  • SkillMagic, then SkillMagic
  • UnskilledScience, then SkillMagic
How do you stack up?
My Progress
Percentage of Total Answers Correct
0 / 0
0%

Breakdown by Tag
0 / 0
0%
0 / 0
0%