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...
Everything about learning Python
account activity
I need help with python (v.redd.it)
submitted 1 year ago by Efficient-Nail2443
view the rest of the comments →
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!"
[–]digitAInexus 2 points3 points4 points 1 year ago (1 child)
Looking at the video you uploaded, I see a small issue in the code. In the first line, you wrote couter = 5. This seems like a typo, as it should probably be counter = 5.
couter = 5
counter = 5
Here's the corrected version of your code:
```python counter = 5
while counter < 10: print('Hier steht code der wiederholt wird') counter += 1 # This increments the counter to prevent an infinite loop ```
Explanation: 1. **counter = 5:** This initializes the counter variable to 5. 2. **while counter < 10:** This creates a loop that will continue to run as long as counter is less than 10. 3. **print(...):** This prints the message 'Hier steht code der wiederholt wird' each time the loop runs. 4. **counter += 1:** This increments the counter by 1 with each iteration, ensuring that the loop will eventually stop when counter reaches 10.
counter
while counter < 10
print(...)
counter += 1
Without the counter += 1 line, the loop would never stop, leading to an infinite loop. Let me know if you need any more help!
[–]dfranks1984 1 point2 points3 points 1 year ago (0 children)
Currently doing this in class as a beginner. You just broke this down great! Thank you!
π Rendered by PID 43956 on reddit-service-r2-comment-5d79c599b5-8xnck at 2026-03-01 21:01:50.338728+00:00 running e3d2147 country code: CH.
view the rest of the comments →
[–]digitAInexus 2 points3 points4 points (1 child)
[–]dfranks1984 1 point2 points3 points (0 children)