# This program produces an error because # a variable is used out of scope. def compute_sum(): sum = x + y # error! print("sum =", sum) def main(): x = 3 y = 7 compute_sum() main()