Hello
I want to learn and understand what am I doing wrong
I wrote a simple code that use try - catch
when I open the code in PyCharm I see this error
why ?
the code is meant to fail on 5
this is just so I can understand the links between the variables on the code
Thanks ,
I want to learn and understand what am I doing wrong
I wrote a simple code that use try - catch
import time i = 0 How_Many_False = 0 def test(): print("number i is : %3.2f " % i) print(f"result is : {i / 10:3.3f}") if i > 5: try: temp = i / 0 print(temp) except Exception as e: print(e) print(How_Many_False) How_Many_False += 1 print("false times is : " % How_Many_False) while 1: i = (i + 1) test() time.sleep(1)but when I try to run it I get error - in the "catch" section
when I open the code in PyCharm I see this error
Quote:Unresolved reference 'How_Many_False'
why ?
the code is meant to fail on 5
this is just so I can understand the links between the variables on the code
Thanks ,