Difference between revisions of "CSC111 Exercises with Global Variables"

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

Revision as of 19:02, 24 April 2014

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



style="width: 50%;"


A = 3

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

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


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