# \#new-users

**URL:** https://discuss.python.org/tag/new-users/38.md

[Latest](https://discuss.python.org/latest.md) · [Categories](https://discuss.python.org/categories.md) · [Tags](https://discuss.python.org/tags.md)

---

## [While Loops, how do they work?](https://discuss.python.org/t/while-loops-how-do-they-work/107621)

<div class="topic-metadata">

**Author:** [@wb.194](https://discuss.python.org/u/wb.194)\
**Replies:** 9\
**Last updated:** [October 7, 2026, 6:09pm UTC](https://discuss.python.org/t/while-loops-how-do-they-work/107621 "2026-10-07T18:09:26Z")

</div>

I’m not new to python as a whole but I’m very bad at it however, I want to learn. I’ve tried to do some coding but I want to know what everything is actually doing rather than just reciting things online so if some of yo…

---

## [\`range()\` with optional inclusive \`stop\`](https://discuss.python.org/t/range-with-optional-inclusive-stop/106521)

<div class="topic-metadata">

**Author:** [@noelgolding](https://discuss.python.org/u/noelgolding)\
**Replies:** 24\
**Last updated:** [September 17, 2026, 6:31pm UTC](https://discuss.python.org/t/range-with-optional-inclusive-stop/106521 "2026-09-17T18:31:40Z")

</div>

I’m considering proposing an optional inclusive parameter for the built-in range() function and would welcome feedback before drafting a formal PEP. This would be a change to the existing range() signature only—no new sy…

---

## [Can't figure out this error message "db type could not be determined"](https://discuss.python.org/t/cant-figure-out-this-error-message-db-type-could-not-be-determined/104272)

<div class="topic-metadata">

**Author:** [@Kurt\_J](https://discuss.python.org/u/Kurt_J)\
**Replies:** 15\
**Last updated:** [October 17, 2025, 7:38pm UTC](https://discuss.python.org/t/cant-figure-out-this-error-message-db-type-could-not-be-determined/104272 "2025-10-17T19:38:12Z")

</div>

Complete noob here. I’ve taken some code straight out of the programming for beginner’s book, modified the variable and file names to those that I’m using, left the rest of the syntax as is, and I get an error that I can…

---

## [I can't find an issue with my code, please help me debug... can't describe any better sorry](https://discuss.python.org/t/i-cant-find-an-issue-with-my-code-please-help-me-debug-cant-describe-any-better-sorry/87941)

<div class="topic-metadata">

**Author:** [@Loic](https://discuss.python.org/u/Loic)\
**Replies:** 3\
**Last updated:** [April 17, 2025, 8:42am UTC](https://discuss.python.org/t/i-cant-find-an-issue-with-my-code-please-help-me-debug-cant-describe-any-better-sorry/87941 "2025-04-17T08:42:39Z")

</div>

Hi, I have this bit of code that is supposed to open the directory selector for the user to go to a directory and… select it. The code itself works on Linux only, and was given to me on r/learnpython. The code - which …

---

## [help something is wrong it's not supposed to go in the negatives!!!](https://discuss.python.org/t/help-something-is-wrong-its-not-supposed-to-go-in-the-negatives/88020)

<div class="topic-metadata">

**Author:** [@bluej](https://discuss.python.org/u/bluej)\
**Replies:** 11\
**Last updated:** [April 11, 2025, 11:46pm UTC](https://discuss.python.org/t/help-something-is-wrong-its-not-supposed-to-go-in-the-negatives/88020 "2025-04-11T23:46:29Z")

</div>

import time import random x=random.randint(1,15) b=float(x) while x \> 0: print(f’“{b}” second left’) b -= 0.1 c=100 while c\>1: print(“times up”) c -= 1 help

---

## [The Difference Between Calling List Methods Inside and Outside of a Print Function](https://discuss.python.org/t/the-difference-between-calling-list-methods-inside-and-outside-of-a-print-function/69482)

<div class="topic-metadata">

**Author:** [@TaskmasterX](https://discuss.python.org/u/TaskmasterX)\
**Replies:** 13\
**Last updated:** [October 29, 2024, 3:57am UTC](https://discuss.python.org/t/the-difference-between-calling-list-methods-inside-and-outside-of-a-print-function/69482 "2024-10-29T03:57:05Z")

</div>

Hi all. I’m a beginner in Python and trying to teach myself, so this might be a silly question. I am confused about how to use class methods, particularly list methods (but this could apply to handling any class), and h…

---

## [Python program: Monitor Display Management](https://discuss.python.org/t/python-program-monitor-display-management/69304)

<div class="topic-metadata">

**Author:** [@xxxlabradorxxx](https://discuss.python.org/u/xxxlabradorxxx)\
**Replies:** 4\
**Last updated:** [October 26, 2024, 7:21pm UTC](https://discuss.python.org/t/python-program-monitor-display-management/69304 "2024-10-26T19:21:08Z")

</div>

Hello, I am by no means an advanced Python scripter; I am not a beginner with Python. I am familiar with the basics, but my skill level is novice compared to many developers on this forum. So, I apologize in advance to …

---

## [Script has \[WinError 2\]](https://discuss.python.org/t/script-has-winerror-2/63739)

<div class="topic-metadata">

**Author:** [@chamberlyian](https://discuss.python.org/u/chamberlyian)\
**Replies:** 1\
**Last updated:** [September 12, 2024, 8:43pm UTC](https://discuss.python.org/t/script-has-winerror-2/63739 "2024-09-12T20:43:19Z")

</div>

Working on downloading a script for da vinci resolve and everything has worked relatively fine until now. It is a “auto sub” maker and it reaches this error message in da vinci’s console when it is about to add the subs …

---

## [Get image click values from another class?](https://discuss.python.org/t/get-image-click-values-from-another-class/47234)

<div class="topic-metadata">

**Author:** [@Layos](https://discuss.python.org/u/Layos)\
**Replies:** 1\
**Last updated:** [February 29, 2024, 7:50pm UTC](https://discuss.python.org/t/get-image-click-values-from-another-class/47234 "2024-02-29T19:50:20Z")

</div>

import customtkinter import tkinter from PIL import Image class CardsImagesCanvas(tkinter.Canvas): def \_\_init\_\_(self, master, values): super().\_\_init\_\_(master) self.values = values self.…

---

## [Learning resources for beginners](https://discuss.python.org/t/learning-resources-for-beginners/52062)

<div class="topic-metadata">

**Author:** [@Quanefi](https://discuss.python.org/u/Quanefi)\
**Replies:** 3\
**Last updated:** [April 29, 2024, 9:01am UTC](https://discuss.python.org/t/learning-resources-for-beginners/52062 "2024-04-29T09:01:04Z")

</div>

Hi, I am learning python through freecodecamp and by reading ‘python crash course’. I want to know how I can contribute to open source projects, considering that I have very little knowledge about programming.

---

## [Request for review: “gh-52161: Enhance Cmd support for docstrings”](https://discuss.python.org/t/request-for-review-gh-52161-enhance-cmd-support-for-docstrings/42295)

<div class="topic-metadata">

**Author:** [@fipachu](https://discuss.python.org/u/fipachu)\
**Replies:** 4\
**Last updated:** [January 3, 2024, 7:48pm UTC](https://discuss.python.org/t/request-for-review-gh-52161-enhance-cmd-support-for-docstrings/42295 "2024-01-03T19:48:22Z")

</div>

Hi fellow sneks! A while ago I did a small improvement to the Cmd module. I would appreciate if someone could take a look. I hope it won’t take long as I only added two lines of code. (And I reformatted a few lines aroun…

---

## [I am new to Python, getting Syntax Error: invalid syntax pip install Flask Flask-SQLAlchemy](https://discuss.python.org/t/i-am-new-to-python-getting-syntax-error-invalid-syntax-pip-install-flask-flask-sqlalchemy/41903)

<div class="topic-metadata">

**Author:** [@manishashar888](https://discuss.python.org/u/manishashar888)\
**Replies:** 3\
**Last updated:** [December 26, 2023, 10:24am UTC](https://discuss.python.org/t/i-am-new-to-python-getting-syntax-error-invalid-syntax-pip-install-flask-flask-sqlalchemy/41903 "2023-12-26T10:24:46Z")

</div>

pip install Flask Flask-SQLAlchemy SyntaxError: invalid syntax

---

## [Rock paper scissors game won't print computer choice right](https://discuss.python.org/t/rock-paper-scissors-game-wont-print-computer-choice-right/41741)

<div class="topic-metadata">

**Author:** [@afx8064](https://discuss.python.org/u/afx8064)\
**Replies:** 13\
**Last updated:** [December 24, 2023, 1:13pm UTC](https://discuss.python.org/t/rock-paper-scissors-game-wont-print-computer-choice-right/41741 "2023-12-24T13:13:44Z")

</div>

Sorry if this is a stupid easy fix, I am VERY new to coding in general So I am trying to code a rock paper scissors game but my result isn’t coming out right and idk why My Code: import random while True: use…

---

## [Error in opening a wav file](https://discuss.python.org/t/error-in-opening-a-wav-file/39090)

<div class="topic-metadata">

**Author:** [@Monkeybanana](https://discuss.python.org/u/Monkeybanana)\
**Replies:** 4\
**Last updated:** [November 19, 2023, 2:40pm UTC](https://discuss.python.org/t/error-in-opening-a-wav-file/39090 "2023-11-19T14:40:38Z")

</div>

I am trying to make a program that will display a fft and waveform of a wav file as it plays. For some reason, python is giving me this error: Traceback (most recent call last): File “C:\\Users\\palla\\PycharmProjects\\Py…

---

## [Help with Terminal Command Lilne](https://discuss.python.org/t/help-with-terminal-command-lilne/36670)

<div class="topic-metadata">

**Author:** [@bobbaird001](https://discuss.python.org/u/bobbaird001)\
**Replies:** 2\
**Last updated:** [October 19, 2023, 10:21pm UTC](https://discuss.python.org/t/help-with-terminal-command-lilne/36670 "2023-10-19T22:21:50Z")

</div>

I have downloaded and installed Python on my Mac. In the terminal, I am unable to call python. I suspect it is because I don’t really understand the command line. I have tried cd but not sure where I need to go. Can …

---

## [Beginner: Number guessing game not working](https://discuss.python.org/t/beginner-number-guessing-game-not-working/33854)

<div class="topic-metadata">

**Author:** [@Cherry](https://discuss.python.org/u/Cherry)\
**Replies:** 11\
**Last updated:** [September 17, 2023, 2:23pm UTC](https://discuss.python.org/t/beginner-number-guessing-game-not-working/33854 "2023-09-17T14:23:44Z")

</div>

Hello! I’m a beginner at Python, I’ve finished a course about the basics regarding Python and am now attempting to do some beginner Python projects from a Youtube video. Right now I’m attempting to create a number-guessi…

---

## [What does ":" do in this line of code?](https://discuss.python.org/t/what-does-do-in-this-line-of-code/29880)

<div class="topic-metadata">

**Author:** [@anneranch](https://discuss.python.org/u/anneranch)\
**Replies:** 7\
**Last updated:** [July 20, 2023, 12:39am UTC](https://discuss.python.org/t/what-does-do-in-this-line-of-code/29880 "2023-07-20T00:39:45Z")

</div>

self.windows = { “about”: AboutWindow(self), … “tdr”: TDRWindow(self), } Can somebody kindly explain the above in English ?

---

## [Confusion with dynamically adding methods in class](https://discuss.python.org/t/confusion-with-dynamically-adding-methods-in-class/29847)

<div class="topic-metadata">

**Author:** [@Sude](https://discuss.python.org/u/Sude)\
**Replies:** 1\
**Last updated:** [July 18, 2023, 7:55pm UTC](https://discuss.python.org/t/confusion-with-dynamically-adding-methods-in-class/29847 "2023-07-18T19:55:32Z")

</div>

class User: pass # Add instance attributes dynamically jane = User() jane.name = "Jane Doe" jane.job = "Data Engineer" jane.\_\_dict\_\_ # {'name': 'Jane Doe', 'job': 'Data Engineer'} # Add methods dynamically def \_\_i…

---

## [Buzzer only beeps once after ending the loop with a button](https://discuss.python.org/t/buzzer-only-beeps-once-after-ending-the-loop-with-a-button/27028)

<div class="topic-metadata">

**Author:** [@xfragmentedx](https://discuss.python.org/u/xfragmentedx)\
**Replies:** 3\
**Last updated:** [May 24, 2023, 3:38pm UTC](https://discuss.python.org/t/buzzer-only-beeps-once-after-ending-the-loop-with-a-button/27028 "2023-05-24T15:38:43Z")

</div>

Hey, I’m new and not really an expert at coding with Python so I need some help with using while loops for my school project. Currently, I have a buzzer that will be triggered and beeps forever when a vibration switch re…

---

## [New to Python (learning functions)](https://discuss.python.org/t/new-to-python-learning-functions/23542)

<div class="topic-metadata">

**Author:** [@Moogl3y](https://discuss.python.org/u/Moogl3y)\
**Replies:** 7\
**Last updated:** [February 5, 2023, 3:33am UTC](https://discuss.python.org/t/new-to-python-learning-functions/23542 "2023-02-05T03:33:05Z")

</div>

learning python and have been utilizing HackinScience, but I have been stumped on this question. Any suggestions on what I am doing incorrectly?

---

## [Can't Install Python because Executable won't Open](https://discuss.python.org/t/cant-install-python-because-executable-wont-open/22492)

<div class="topic-metadata">

**Author:** [@RaisingEntropy](https://discuss.python.org/u/RaisingEntropy)\
**Replies:** 4\
**Last updated:** [January 6, 2023, 10:44pm UTC](https://discuss.python.org/t/cant-install-python-because-executable-wont-open/22492 "2023-01-06T22:44:43Z")

</div>

Hello everyone, my name is Luiz and I’m new to this forum, so please forgive me if I’m making some mistake on posting this or anything else. I wanted to learn programing for a long time and decided to start with Python,…

---

## [Requesting a code review](https://discuss.python.org/t/requesting-a-code-review/20107)

<div class="topic-metadata">

**Author:** [@Denise\_unique](https://discuss.python.org/u/Denise_unique)\
**Replies:** 32\
**Last updated:** [December 25, 2022, 6:21am UTC](https://discuss.python.org/t/requesting-a-code-review/20107 "2022-12-25T06:21:32Z")

</div>

This is either my first or second Python project, and I’m still learning how to program. I’m finding it challenging to comprehend classes and methods in terms of programming in general. Is it possible to make this code m…

---

## [Need help with beginner math program](https://discuss.python.org/t/need-help-with-beginner-math-program/21124)

<div class="topic-metadata">

**Author:** [@Sude](https://discuss.python.org/u/Sude)\
**Replies:** 4\
**Last updated:** [November 16, 2022, 2:54pm UTC](https://discuss.python.org/t/need-help-with-beginner-math-program/21124 "2022-11-16T14:54:13Z")

</div>

I want to print divisors of given number and print “the number is prime number” if the user gives prime number. n = int(input("enter number ")) for x in range(2,n): if n % x == 0: print(x) elif n % x != 0: print(f…

---

## [Need help with file handling](https://discuss.python.org/t/need-help-with-file-handling/20617)

<div class="topic-metadata">

**Author:** [@Sude](https://discuss.python.org/u/Sude)\
**Replies:** 4\
**Last updated:** [November 2, 2022, 8:03am UTC](https://discuss.python.org/t/need-help-with-file-handling/20617 "2022-11-02T08:03:35Z")

</div>

Why the output is empty in the following code f = open("/storage/emulated/0/Pokemon.txt","w+") f.write("""A is first letter of Alphabet B is second letter of Alphabet C is third letter of Alphabet D is fourth letter of…

---

## [How functions works?](https://discuss.python.org/t/how-functions-works/20127)

<div class="topic-metadata">

**Author:** [@Sude](https://discuss.python.org/u/Sude)\
**Replies:** 1\
**Last updated:** [October 20, 2022, 3:14am UTC](https://discuss.python.org/t/how-functions-works/20127 "2022-10-20T03:14:45Z")

</div>

Why this function is behaving like a loop def factorial(no): if no == 0: return 1 else: return no \* factorial(no - 1) print("factorial of a number is:", factorial(8)) why this behaves like a lo…

---

## [How continue works in while loop](https://discuss.python.org/t/how-continue-works-in-while-loop/20087)

<div class="topic-metadata">

**Author:** [@Sude](https://discuss.python.org/u/Sude)\
**Replies:** 11\
**Last updated:** [October 19, 2022, 9:33am UTC](https://discuss.python.org/t/how-continue-works-in-while-loop/20087 "2022-10-19T09:33:16Z")

</div>

name = 'Jesaa29 Roy' size = len(name) i = 0 while i \< size: if name\[i\].isspace(): continue print(name\[i\], end=' ') i = i + 1 #it’s supposed to print name without space “Jessa29Roy”, but the output i…

---

## [How while loop wroks?](https://discuss.python.org/t/how-while-loop-wroks/20103)

<div class="topic-metadata">

**Author:** [@Sude](https://discuss.python.org/u/Sude)\
**Replies:** 1\
**Last updated:** [October 19, 2022, 3:42am UTC](https://discuss.python.org/t/how-while-loop-wroks/20103 "2022-10-19T03:42:11Z")

</div>

My previous question name = 'Jesaa29 Roy' size = len(name) print(size) i = 1 while i \< size: if name\[i\].isspace(): i += 1 continue print(name\[i\], end='') i += 1 The point in this question wa…

---

## [Need help with functor object in python](https://discuss.python.org/t/need-help-with-functor-object-in-python/19602)

<div class="topic-metadata">

**Author:** [@Hali](https://discuss.python.org/u/Hali)\
**Replies:** 1\
**Last updated:** [September 30, 2022, 8:16pm UTC](https://discuss.python.org/t/need-help-with-functor-object-in-python/19602 "2022-09-30T20:16:58Z")

</div>

I do not understand my mistake in the code. Can someone correct me and also suggest good reading material? TypeError: ‘NonLinearFunction’ object is not callable import math class NonLinearFunction : # The constru…

---

## [Information for new users](https://discuss.python.org/t/information-for-new-users/16688)

<div class="topic-metadata">

**Author:** [@rob42](https://discuss.python.org/u/rob42)\
**Replies:** 38\
**Last updated:** [September 19, 2022, 7:19pm UTC](https://discuss.python.org/t/information-for-new-users/16688 "2022-09-19T19:19:05Z")

</div>

I don’t know if this will fly, but here goes… I seem to recall that there was some automated script that ran when I first singed up here (the details of which escape me) that guided me through some basics such as editin…

---

## [Confusion on implementation of socket.py](https://discuss.python.org/t/confusion-on-implementation-of-socket-py/18503)

<div class="topic-metadata">

**Author:** [@Notadumdum](https://discuss.python.org/u/Notadumdum)\
**Replies:** 8\
**Last updated:** [August 26, 2022, 4:37pm UTC](https://discuss.python.org/t/confusion-on-implementation-of-socket-py/18503 "2022-08-26T16:37:16Z")

</div>

Good day, I’m having a little problem…i want to connect a website’s server and the URI looks like this I asked for help on a discord server and someone sent a link to socket.py I’m here looking at it and i have no i…

[Next page](https://discuss.python.org/tag/new-users/38.md?match_all_tags=true&page=1&tags%5B%5D=new-users)
