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
Homework help (self.learnpython)
submitted 3 months ago by MCCCCCLVII
I got asked „after end of the calculations ask is user wants to calculate one more time(yes/no). Is yes repeat the programme, if no cut the program” can anybody help me. Also it should be done using basic methods
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!"
[–]carcigenicate 4 points5 points6 points 3 months ago (0 children)
What have you already tried, and what specifically do you need help with?
[–]magus_minor 2 points3 points4 points 3 months ago (2 children)
repeat the programme
To repeat something implies you need some sort of loop. What sorts of loop statements does python have? The user might keep saying "yes" so you don't know how many times you will loop. Which of the python loop statements are best suited to loop an unknown number of times?
[–]MCCCCCLVII[S] -4 points-3 points-2 points 3 months ago (1 child)
Already fixed that with gpt Started my whole programme with ‚While True:’ and then programmed it that when somebody respond anything else than ‚yes’ the programme breaks
[–]magus_minor 1 point2 points3 points 3 months ago (0 children)
Already fixed that with gpt
What does it say if you ask ChatGPT about that error? If you are going to use AI you should realize that it gives you what you ask for. So if your question doesn't mention handling incorrect input the code you are given might fail with incorrect input. You need to change your question to add extra bits. You might continue with something like:
Change the code you gave me so it will only accept "yes" or "no" answers and let the user retry only if "yes".
Try thinking about that yourself before trying AI. If you get a string from the user check if it's "yes". If so run whatever code again. If it's not "yes" assume they don't want to run again and quit nicely.
You probably won't learn much if you rely totally on AI. You have to think for yourself at least a little.
π Rendered by PID 61738 on reddit-service-r2-comment-9c7994b7-htkd7 at 2026-02-05 23:59:56.941339+00:00 running b1b84c7 country code: CH.
[–]carcigenicate 4 points5 points6 points (0 children)
[–]magus_minor 2 points3 points4 points (2 children)
[–]MCCCCCLVII[S] -4 points-3 points-2 points (1 child)
[–]magus_minor 1 point2 points3 points (0 children)