PYTHON: THE NO-NONSENSE GUIDE: Learn Python Programming Within 12 Hours! (Including a FREE Python Cheatsheet & 50+ Exercises With Original Python Files ) (Cyberpunk Programming Series) by Cyberpunk University

PYTHON: THE NO-NONSENSE GUIDE: Learn Python Programming Within 12 Hours! (Including a FREE Python Cheatsheet & 50+ Exercises With Original Python Files ) (Cyberpunk Programming Series) by Cyberpunk University

Author:Cyberpunk University [University, Cyberpunk]
Language: eng
Format: epub, pdf
Published: 2017-01-08T08:00:00+00:00


#Now call the AgeChanger function

ages = [10,15,20]

AgeChanger(ages)

print ("Values outside the function: ", ages)

When you run this exercise, you should see something like this:

C:\Python35-32\Exfiles>python Ex28.py

Values inside the function: [18, 21, 34]

Values outside the function: [10, 15, 20]

The parameter ages is local to the function AgeChanger function. When you change the ages values within the function, it does not affect ages outside the function, therefore producing nothing.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.