r/PythonLearning • • Oct 11 '26

Help Request Trouble with printing

Post image

I’ve been having trouble with an assignment I’m doing and I’m not sure where I went wrong. The only error i’m getting is “‘str’ object is not callable” and i’m not sure if anything else here is wrong.

Edit: After messing around with the code a bit, turns out my code wasn’t the problem and my previous files weren’t printing. After restarting vscode, everything was fine again. Thank you everyone!

45 Upvotes

49 comments sorted by

View all comments

41

u/RNG_HatesMe Oct 11 '26 • Bravo

First rule NEVER post code as a picture! How do you expect someone to test it out? Retype everything, really? And half the time, if you have a typo or minor syntax error then a more experienced programmer will intuitively fix it without realizing it.

Repost as actual code. There's even "code" and "code block" syntax type on reddit to get it to line up:

a = 'hello world'
print(a)

-22

u/broccolee Oct 11 '26 • Bravo

Yeah its not like you could paste the screen to some Ai and have it spit out the text

13

u/RNG_HatesMe Oct 11 '26

Ahh, yeah, that's the solution. Instead of the poster copying and pasting the program text into reddit AS IT IS ORIGINALLY, they should instead screenshot it, paste it into a post, where other redditors can then copy the image, paste it into chatGPT (wasting how much energy and water?) to have it turned back into text and HOPE that it did it accurately?

1

u/Im_the_mafia_ Oct 11 '26

I screenshotted the code because it was originally on a computer that I couldn’t access reddit on, so I had to send the photo to my phone.

3

u/FreeLogicGate Oct 11 '26

So you cut and paste the code into the same email that you instead pasted your screenshot (code is text) and then use the code in your reddit code block on the machine you posted from, instead of being lazy and annoying the people you are hoping could help you.

-5

u/Im_the_mafia_ Oct 11 '26

yeah, it was so annoying that six people answered with no issue. Go wash between your necks

3

u/FreeLogicGate Oct 11 '26

You can be lazy and stupid and some people will still try and help you. The irony is that you already updated that you had some sort of "environment" issue (probably pebkac), and that this entire thread was a waste of time for all involved. So the only thing that could possibly be of value now, would be to help you understand the error in your approach, so that you avoid it in the future, and yet here you are doubling down and making excuses that reflect you're stubborn and allergic to learning.

-4

u/Im_the_mafia_ Oct 11 '26

I’m actually just allergic to cunts. If you think i’m annoyed cuz I was told to not ask for help with a screenshot, I can tell Harvard is just knocking your door down.

1

u/csabinho Oct 12 '26

You're allergic to cunts? Brace yourself for an autoimmune disease.

1

u/Im_the_mafia_ Oct 12 '26

Brace yourself for the sex offender registry, because the only way a woman will let you in her is if you force yourself.

→ More replies (0)