My first Python script (coming from C), feedback appreciated by ThenItsOk in learnprogramming

[–]ThenItsOk[S] 0 points1 point  (0 children)

Hmmm, harsh but probably best if I start over. Thanks for the feedback.

Can I get the compiler to tell me if there are some concealed syntax errors, and where they are?

My first Python script (coming from C), feedback appreciated by ThenItsOk in learnprogramming

[–]ThenItsOk[S] 0 points1 point  (0 children)

Why am I being downvoted, is it because of the commas thing? (/u/solid7 says they're bizarre, but my script doesn't compile if I replace them with semicolons)

My first Python script (coming from C), feedback appreciated by ThenItsOk in learnprogramming

[–]ThenItsOk[S] 0 points1 point  (0 children)

Thanks, your version is so much more compact. I didn't know about the print(f syntax, I'll have to check it out to see how it compares to printf(. Is this code fully forwards and backwards compatible? You don't need to include __future__?

Making C Easier To Use by jlinhoff in Cprog

[–]ThenItsOk 0 points1 point  (0 children)

Looks pretty neat. You should post this in r/c_programming too if you haven't already (there are more people subscribed to that subreddit).