fork download
  1. n=2 #グローバル変数
  2.  
  3. def calcPower(m):
  4. v=n**m
  5. return v
  6.  
  7. print(calcPower(3))
  8. print(calcPower(4))
  9. print(calcPower(5))
  10. print(n)
Success #stdin #stdout 0.02s 63088KB
stdin
Standard input is empty
stdout
8
16
32
2