Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Help with Global/Coerced Variable (Understanding Scope)
Post: RE: Help with Global/Coerced Variable (Understandi...

Thank you so much for solving my issue, both of you.
Rev2k General Coding Help 6 3,513 Jan-09-2020, 03:43 AM
    Thread: Help with Global/Coerced Variable (Understanding Scope)
Post: RE: Help with Global/Coerced Variable (Understandi...

modified code: global_var = 1 def my_vars(): print( "Global Variable:" , global_var ) local_var = 2 print( "Local Variable:" , local_var ) global inner_var inner_var = 3 my...
Rev2k General Coding Help 6 3,513 Jan-09-2020, 03:36 AM
    Thread: Help with Global/Coerced Variable (Understanding Scope)
Post: RE: Help with Global/Coerced Variable (Understandi...

Thx for the reply ich - I'm now getting this back(not even the full return as it goes on forver and is too large to post): Error:Global Variable: 1 Local Variable: 2 Global Variable: 1 Local Variable...
Rev2k General Coding Help 6 3,513 Jan-09-2020, 03:26 AM
    Thread: Help with Global/Coerced Variable (Understanding Scope)
Post: Help with Global/Coerced Variable (Understanding S...

Hi, I'm going through the python in easy steps book and have hit a snag with global/coerced variables. I've copied the code exactly from the book but not getting the return I expect. Here is the code...
Rev2k General Coding Help 6 3,513 Jan-09-2020, 03:12 AM
    Thread: Syntax error - precedence
Post: RE: Syntax error - precedence

Figured it out. It was the single quotes(') next to the (%) and (=) signs I had in the wrong place. This is what it should look like (which returned no errors) : print( 'Forced order:\t' , c, '% (',...
Rev2k General Coding Help 3 2,227 Jan-03-2020, 08:36 PM
    Thread: Syntax error - precedence
Post: Syntax error - precedence

Hi there, i'm new to coding/python and keep getting a syntax error. This gives me a syntax error: print( 'Forced order:\t' , c, '%'(, a, '+', b,) '=', c % ( a + b ) )Can anyone see where I went wro...
Rev2k General Coding Help 3 2,227 Jan-03-2020, 02:31 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020