Discussion about math, puzzles, games and fun. Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °
You are not logged in.
Post a reply
Topic review (newest first)
sorry... wrong language:
El error tipo "<pyshell#4>"es por error de impresion...
True, but that doesn't explain why it works on Windows, but not Mac.
Not a python programmer here, but it looks like day is declared locally instead of globally. This means that it won't exist in other local routines.
Sorry to double post, but I noticed that a Windows machine with the same installation of Python doesn't have a single problem.
import random def Start(): day = 0 #This variable definition should work... DayTime() ...
Here's what I get when I run it:
Traceback (most recent call last): File "<pyshell#4>", line 1, in <module> Start() File "/Users/Rayment/Documents/Chase/games/Python/Mafiya!", line 5, in Start DayTime() File "/Users/Rayment/Documents/Chase/games/Python/Mafiya!", line 7, in DayTime day = day + 1; UnboundLocalError: local variable 'day' referenced before assignment
I know that means that my variable definition is wrong, but it should be right. What gives?