Difference between revisions of "CSC111 Exercises with Global Variables"
Line 2: | Line 2: | ||
---- | ---- | ||
<br /> | <br /> | ||
− | + | {| | |
− | + | | | |
− | |||
<br /> | <br /> | ||
<source lang="python"> | <source lang="python"> | ||
Line 17: | Line 16: | ||
</source> | </source> | ||
<br /> | <br /> | ||
− | + | | | |
− | + | <source lang="text"> | |
− | <source lang=" | + | >>> |
− | + | A = 3 | |
− | + | f1 30 3 | |
− | + | >>> | |
− | |||
− | f1 | ||
− | |||
− | |||
</source> | </source> | ||
+ | |} | ||
− | |||
− | |||
− | |||
<br /> | <br /> | ||
<br /> | <br /> |
Revision as of 19:00, 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
>>>
|