Updating a global variable without global

What is the output of the code in Listing 1?

Listing 1: A code snippet that defines a global variable x and a function func.
x = 10

def func():
    x += 5
    print(x)

func()
print(x)

Choose the correct option:

  • The code will print 15 and 10.
  • The code will print 10 and 15.
  • The code will print 15 and 15.
  • The code will raise an UnboundLocalError.