<jupyter_start><jupyter_text>Pass by Value vs. Pass by Reference<jupyter_code>default_hours = 30
default_pay = 15.25

def calculate_weeks_pay(hours, pay):
    gross = hours * pay
    net = gross * 0.90
    return net, gross

calculate_weeks_pay(default_hours, default_pay)
default_hours = 30
default_pay = 15.25

def calculate_weeks_pay(hours, pay):
    default_hours = 40
    print(default_hours)
    gross = hours * pay
    net = gross * 0.90
    return net, gross

print(default_hours)

calculate_weeks_pay(default_hours, default_pay)
students = ['james', 'joe', 'sally']
print(students)

def append_sue_to_list(my_list):
    my_list.append('sue')
    
append_sue_to_list(students)
print(students)<jupyter_output>['james', 'joe', 'sally']
['james', 'joe', 'sally', 'sue']
{'fraction_non_alphanumeric': 0.12144702842377261, 'fraction_numerical': 0.025839793281653745, 'mean_word_length': 5.007751937984496, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '208423', 'license': 'MIT', 'n_tokens_mistral': 322, 'n_tokens_neox': 293, 'n_words': 62, 'path': 'Lecture Material/06_Functions/06.4-Pass_by_Value_vs_Pass_by_Reference.ipynb', 'repo_name': 'knherrera/pcc-cis-012-intro-to-programming-python', 'size': '774'}