Difference between revisions of "CSC111 Exercises with Global Variables"

From dftwiki3
Jump to: navigation, search
Line 3: Line 3:
 
<br />
 
<br />
 
{| class="wikitable" style="width:100%;"
 
{| class="wikitable" style="width:100%;"
| style="width: 50%;"
+
| style="width: 50%;" |
 
<br />
 
<br />
 
<source lang="python">
 
<source lang="python">

Revision as of 19:03, 24 April 2014

--D. Thiebaut (talk) 15:57, 24 April 2014 (EDT)




A = 3

def f1( x ):
    print( "f1", x, A )

print( "A = ", A )
f1( 30 )


>>> 
A =  3
f1 30 3
>>>