Looks like you may have some indentation errors, but I can’t see as we lost formatting. Can you repost with the formatting by selecting your code and hitting the preformatted text button (it’s the </> butting next to the quote) on the toolbar?
Also expand the error and post it so we can see that as well - really helps narrow things down.
Lastly, could you use regular nodes here? May be easier to wrap your head around as this isn’t easy for a ‘my first Python’ type of task.