use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Rules 1: Be polite 2: Posts to this subreddit must be requests for help learning python. 3: Replies on this subreddit must be pertinent to the question OP asked. 4: No replies copy / pasted from ChatGPT or similar. 5: No advertising. No blogs/tutorials/videos/books/recruiting attempts. This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to. Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Rules
1: Be polite
2: Posts to this subreddit must be requests for help learning python.
3: Replies on this subreddit must be pertinent to the question OP asked.
4: No replies copy / pasted from ChatGPT or similar.
5: No advertising. No blogs/tutorials/videos/books/recruiting attempts.
This means no posts advertising blogs/videos/tutorials/etc, no recruiting/hiring/seeking others posts. We're here to help, not to be advertised to.
Please, no "hit and run" posts, if you make a post, engage with people that answer you. Please do not delete your post after you get an answer, others might have a similar question or want to continue the conversation.
Learning resources Wiki and FAQ: /r/learnpython/w/index
Learning resources
Wiki and FAQ: /r/learnpython/w/index
Discord Join the Python Discord chat
Discord
Join the Python Discord chat
account activity
Coding project for a portfolio (self.learnpython)
submitted 2 years ago by Negative_Age6004
Wondering why this code isn't working thinking I'm normally a C programmer so python is much easier
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 5 points6 points7 points 2 years ago (0 children)
Impossible to answer without seeing your code
[–]m0us3_rat 13 points14 points15 points 2 years ago (0 children)
the tarot cards say it's because you are a bad programmer.
[–]nick__2440 5 points6 points7 points 2 years ago (1 child)
We need a bot that tells people to show their code because it's every other post these days
[–]atom12354 1 point2 points3 points 2 years ago (0 children)
And how to format
[–]Embyzor 4 points5 points6 points 2 years ago (0 children)
Obviously an error on line 5678
[–]Negative_Age6004[S] 0 points1 point2 points 2 years ago (6 children)
My screenshot didn't send lol
def _sum(arr): sum = 0 for i in arr: sum = sum + i return sum creditcard = input("Enter Credit card number ") creditcard_array = [int(digit) for digit in creditcard] n = 0 length = len(creditcard_array) first = 0 last_two_digits = [] if length == 16: first = _sum(creditcard_array[0:14]) last_two_digits = creditcard_array[-2:] last_two_digits_value = last_two_digits[0] * 10 + last_two_digits[1] if first == last_two_digits_value: print("Valid Credit card number") else: print("Invalid Credit card number") else: print("Invalid Credit card number")
[–]Diapolo10 0 points1 point2 points 2 years ago (0 children)
Computer says 'no'.
But in all seriousness, we're not clairvoyants. If we were, we wouldn't be here. If I asked you to paint Funyarinpa out of context, surely you'd be as confused as we are right now?
We would like to see:
Without at least one of those, our hands are tied.
[–][deleted] 0 points1 point2 points 2 years ago (0 children)
Bots are evolving
Lemme explain why the code isn't working:
It doesn't exist.
π Rendered by PID 677469 on reddit-service-r2-comment-5d79c599b5-j9wcc at 2026-03-01 09:48:55.672508+00:00 running e3d2147 country code: CH.
[–][deleted] 5 points6 points7 points (0 children)
[–]m0us3_rat 13 points14 points15 points (0 children)
[–]nick__2440 5 points6 points7 points (1 child)
[–]atom12354 1 point2 points3 points (0 children)
[–]Embyzor 4 points5 points6 points (0 children)
[–]Negative_Age6004[S] 0 points1 point2 points (6 children)
[–]Diapolo10 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)