# Created by: David Wang
# Created on: 28-Sep-2017
# Created for: ICS3U
# Daily Assignment - Unit1-06
# This program shows the difference between local and global variables 

import ui

variableX = 25

def local_button_touch_up_inside(sender):
    
    variableX = 10
    variableY = 30
    variableZ = variableX + variableY
    
    view['local_answer_label'].text = str(variableZ)
        
def global_button_touch_up_inside(sender):
    
    variableY = 30
    variableZ = variableX + variableY
    
    view['global_answer_label'].text = str(variableZ)

view = ui.load_view()
view.present('full_screen')

c26846092b8773737a55686c7dd16133b4b2021e
<mask token>


def local_button_touch_up_inside(sender):
    variableX = 10
    variableY = 30
    variableZ = variableX + variableY
    view['local_answer_label'].text = str(variableZ)


def global_button_touch_up_inside(sender):
    variableY = 30
    variableZ = variableX + variableY
    view['global_answer_label'].text = str(variableZ)


<mask token>

<mask token>


def local_button_touch_up_inside(sender):
    variableX = 10
    variableY = 30
    variableZ = variableX + variableY
    view['local_answer_label'].text = str(variableZ)


def global_button_touch_up_inside(sender):
    variableY = 30
    variableZ = variableX + variableY
    view['global_answer_label'].text = str(variableZ)


<mask token>
view.present('full_screen')

<mask token>
variableX = 25


def local_button_touch_up_inside(sender):
    variableX = 10
    variableY = 30
    variableZ = variableX + variableY
    view['local_answer_label'].text = str(variableZ)


def global_button_touch_up_inside(sender):
    variableY = 30
    variableZ = variableX + variableY
    view['global_answer_label'].text = str(variableZ)


view = ui.load_view()
view.present('full_screen')

import ui
variableX = 25


def local_button_touch_up_inside(sender):
    variableX = 10
    variableY = 30
    variableZ = variableX + variableY
    view['local_answer_label'].text = str(variableZ)


def global_button_touch_up_inside(sender):
    variableY = 30
    variableZ = variableX + variableY
    view['global_answer_label'].text = str(variableZ)


view = ui.load_view()
view.present('full_screen')

# Created by: David Wang
# Created on: 28-Sep-2017
# Created for: ICS3U
# Daily Assignment - Unit1-06
# This program shows the difference between local and global variables 

import ui

variableX = 25

def local_button_touch_up_inside(sender):
    
    variableX = 10
    variableY = 30
    variableZ = variableX + variableY
    
    view['local_answer_label'].text = str(variableZ)
        
def global_button_touch_up_inside(sender):
    
    variableY = 30
    variableZ = variableX + variableY
    
    view['global_answer_label'].text = str(variableZ)

view = ui.load_view()
view.present('full_screen')
