#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ENGG1811 Lecture Week 02 Demonstrate local scope of variables You can copy the code to Python tutor website to visualise the code: http://pythontutor.com/visualize.html """ def my_power(x,n): y = x ** n return y y = 4 z = my_power(y,2) print('y = ',y) print('z = ',z)