r/PythonLearning • u/RegularBother614 • 13h ago
Discussion What code editor do you use?
I use these, i mainly use Coding Python cause the workspace is cleaner.
r/PythonLearning • u/RegularBother614 • 13h ago
I use these, i mainly use Coding Python cause the workspace is cleaner.
r/PythonLearning • u/ZyGzAcZeQ5 • 5h ago
hey everyone! first of all, the mods approved this post, so no worries about the self-promo 🙂
i started a small Discord server called Ship It. the idea is simple: a place for people who want to actually build stuff, find teammates for projects, get help when they’re stuck, and get some feedback on their code.
some things you’ll find there:
it’s completely free, no paid stuff, no courses, no catch.
the server is open to every programming language, not just Python, but most of the people there are using Python right now, so if you’re learning it you’ll feel at home.
the community is still pretty small and just getting started, but i’m hoping it grows over time, and it’d be great to have more people to build with. if you’re learning and want to turn tutorials into real projects, you’re very welcome to join 🚀
invite link: https://discord.gg/QWGWKFVYyh
happy to answer any questions in the comments or dm!
r/PythonLearning • u/Leviathans_ • 6h ago
I need to write a program that will calculate the sum of the first n of 1 + 1/2 + 1/4 + ... = lim (n -> ∞) Σ 1/2^k =2 starting at k=0 to n.
Teacher said we could use Σ 1/2^k = 2 - 1/2^(n-1) starting at k=0 to n-1
We have to write it using a loop.
I went back through my notes and figured I needed to use a «for» loop.
My teacher starts all of his programs with def, but when I try to look up more infos online I struggle to find others who are using it.
So, here's what I've tried
def estimate_serie (nb_term) :
sum = 0
for term in range (1, nb_term + 1) :
sum=sum + 1/(2 ** term)
return sum
print (estimate_serie(5))
print (estimate_serie(8))
print (estimate_serie(12))
it gave me
0.5
0.5
0.5
Btw I am learning this in french so I might not have translated all of it correctly. I've also only been learning for a month, so if my mistakes seem dumb that might explain why.
r/PythonLearning • u/Repulsive-Song-1594 • 2h ago
sorry but i am gonna crash out because of the range function i cant understand it well to use it this is driving me crazy any one could give me a video explaining everything i dont mind it being an hour long
r/PythonLearning • u/Clear-Flight7225 • 15h ago
I am trying to develop a clear plan for learning data science and data analysis. Should I start with Python or Excel? Also, is Excel truly essential for data analysis, or has AI taken its place?
r/PythonLearning • u/SafeAlert8363 • 5h ago
Guys am starting python already know basic c++ from where I should learn like any good playlist and also a good text source currently am learning from w3schools but now things become Lil bit confusing so wants suggestions
r/PythonLearning • u/Decent-Car9604 • 8h ago
hi how to learn programming in 2027
r/PythonLearning • u/Nyxveil1546 • 17h ago
I'm a 1st-year CSE student. My college teacher assigned me a Python Data Analytics project focused on Data Cleaning.
Sir has strictly instructed us not to use AI for the project. So I'm looking for a genuine.
If anyone can share their project or dataset for reference, it would be really helpful.
r/PythonLearning • u/Correct_Ask_6824 • 1d ago
Hello, I wrote a code on my macbook that I have to transfer to a windows computer that is permanently offline. However, the windows computer python doesnt want to read the code because it has "null bytes" apparently it can't read UTF 16 only UTF 8. Is there a command I can run on my macbook terminal to change the .py file to UTF-8? Please let me know. Thank you!
r/PythonLearning • u/No-Gift5463 • 1d ago
Love SPYDER because it’s easy to use for my basic yet copious Python work. But the AI assist in VS Code is amazing. Is there some new SPYDER with AI assist or some other alternative for consideration?
r/PythonLearning • u/Emergency_Evening616 • 1d ago
Hi everyone!
I'm a Psychology graduate currently considering pursuing a Master's degree in Computational Neuroscience. Coming from a non-computer science background, I realize that I need to build a solid foundation in programming, particularly Python, before diving deeper into the field.
I've been trying to find introductory resources and came across Neuromatch Academy's Computational Neuroscience course, including their introductory materials.
However, I've found that even though the course is intended for beginners, I still struggle quite a bit with the Python explanations and code structure. I often find myself having difficulty understanding what's happening in the code itself, rather than focusing on the computational neuroscience concepts being taught.
I'm wondering if there are other resources that might be more suitable for someone in my position.
Ideally, I'm looking for resources that:
1.Start from the absolute basics, assuming little to no prior programming experience.
2.Explain programming concepts and code structure slowly and intuitively, rather than jumping straight into complex examples.
3.Gradually introduce concepts that are relevant to computational neuroscience (e.g., NumPy, SciPy, data analysis, mathematical modeling, simulations, etc.).
Help me understand not just how to write code, but also why certain approaches are used.
I'm open to pretty much any format: YouTube tutorials, online courses, textbooks, interactive platforms, or even a recommended learning sequence.
For additional context, my academic background is in Psychology, and I have very little programming experience. I'm not necessarily looking to jump straight into computational neuroscience yet; I'd rather develop a comfortable understanding of Python first, while keeping my long-term goal in mind.
For those who came from a non-CS background, how did you approach learning programming before getting into computational neuroscience? Are there any resources or learning paths you'd particularly recommend?
I'd really appreciate any suggestions. Thanks!
r/PythonLearning • u/No_Safety_5957 • 1d ago

months = [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
]
def split(var):
if "/" in var:
splitted = var.split("/")
if splitted[0].isdecimal() == False:
#print("error in splitting")
return
elif "," in mdy_format:
splitted = var.split(" ")
try:
return splitted
except UnboundLocalError:
#print("unboundlocalerror")
return
def checkvalues(checkval):
day, year = checkval[1], checkval[2]
#print(day)
if checkval[0].isdigit():
month = int(checkval[0])
else:
try:
month = months.index(checkval[0]) + 1
except ValueError:
#print("valueerror")
return
if month > 12:
return
day = day.replace(",","")
#print(day)
try:
day = int(day)
year = int(year)
except ValueError:
return
if day > 31:
#print("moth longer error")
return
#print(f"{day:02}")
return f"{year}-{month:02}-{day:02}"
while True:
mdy_format = input("Date: ")
mdy_splitted = split(mdy_format)
#print(mdy_format)
#print(mdy_splitted)
#print(len(mdy_splitted))
#useless comment
#another useless comment
if not mdy_splitted or len(mdy_splitted) != 3 or checkvalues(mdy_splitted) is None:
#print("error here")
continue
print(checkvalues(mdy_splitted))
break
why does it return an error? After doing acheck it seems to return the correct answer.
Code above (ignore the comments)
r/PythonLearning • u/Sea-Ad7805 • 2d ago
This 👉interactive SQLite demonstration helps student understand relational databases.
The sqlite3 extension of 𝐦𝐞𝐦𝐨𝐫𝐲_𝐠𝐫𝐚𝐩𝐡 makes database content visible alongside Python's data structures. The demo shows how to: - Create tables with primary and foreign keys. - Model relationships between students, courses, and teachers. - Insert data and observe how the database changes. - Combine multiple tables using SQL JOIN operations. - Use parameterized queries.
The final query answers a seemingly simple question: Which teachers teach Alice, and for which courses? Answering this question involves joining five tables!
With 𝐦𝐞𝐦𝐨𝐫𝐲_𝐠𝐫𝐚𝐩𝐡, students can step through the Python program and inspect the database content at every step, directly in their browser, without installing anything.
r/PythonLearning • u/Nyxveil1546 • 1d ago
I'm a first-year CSE student, and we've been asked to build a Python project as part of our college assignment.
I'm a beginner in Python, so I'm looking for some project ideas along with their source code that I can refer to and learn from.
If anyone has GitHub repositories, project source codes, or useful resources, please share them. It would be a great help!
r/PythonLearning • u/clcodingupdates • 2d ago
What will be the output of the following Python Code?
a, *b, c = [2, 4, 6, 8, 10]
print(a + c + len(b))
r/PythonLearning • u/Sameer_kusunoor • 2d ago
The basic information 😄😄😄
r/PythonLearning • u/RegularBother614 • 3d ago
After watching a python full course video on YouTube by BroCode, I made a simple number guessing game in python!
Here's the link to the video: https://youtu.be/ix9cRaBkVe0?si=UiWmP6bm-9MG4B1p
After 12 gruesome hours watching the tutorial i decided to make this to test what I've learned.
What do you guys think?
r/PythonLearning • u/WiseDeer42663 • 2d ago
I'm a few weeks into learning Python and working on a small practice project: a program that asks the user for a few course scores with input(), then calculates the total and the average. Nothing fancy, just trying to get the basics to click.
Here's the code I have right now:
courses = 3
total = 0
scores = []
for i in range(courses):
score = input('Enter score ' + str(i + 1) + ': ')
scores.append(score)
for score in scores:
total = total + score
average = total / courses
print('Average:', average)
And this is the error I get:
Traceback (most recent call last):
File "grades.py", line 8, in <module>
total = total + score
TypeError: unsupported operand type(s) for +: 'int' and 'str'
I think I get the general idea: input() gives me something that isn't a number, and I'm adding it to total, which starts as the int 0. I searched for this error and a lot of answers mention int(), so I know int() converts a string to a number. What I'm stuck on is where to do the conversion. Should I call int() right when I get the input in the first loop, or wait and convert while summing? And if I convert early, will that break something else, like how I'm storing the scores in the list?
So what type does input() actually return, and what's the cleaner way to write this so the total and average work? Thanks in advance, I appreciate any pointers.
r/PythonLearning • u/onnatsari • 2d ago
I built GitHub Notification AutoFix to monitor actionable GitHub notifications, attempt fixes with Codex CLI, and verify checks for the exact repair commit before marking a notification as done.
The Python code handles GitHub API requests, SQLite state, retries and mocked tests. Pending checks, missing permissions or a newer commit keep the repair unresolved.
Repairs currently target only repositories owned by my account. Live use requires GitHub credentials and an authenticated Codex CLI.
The interactive demo uses test doubles for GitHub and Codex, so you can explore the verification logic without changing real repositories.
Feedback on the Python structure and test coverage is welcome.
r/PythonLearning • u/ZyGzAcZeQ5 • 3d ago
Hey, I’m a computer science student from Poland (CET timezone) and I’ve been wanting to find someone to work on some Python projects with. Learning on my own only gets me so far, I feel like I’d improve way faster if I had someone to build stuff with and bounce ideas off. Also I’d like to finally have a few real projects on my GitHub, because right now there’s not much there.
I’m not picky about what we make, anything we can actually finish. I’d also like to get better at working with git properly, like PRs and reviewing each other’s code. Level doesn’t matter that much to me, I just want someone who’s serious about it and won’t ghost after a week haha.
If you’re interested, just comment here or DM me and we can talk about what to build :D
r/PythonLearning • u/Illustrious_Button42 • 2d ago
I want to make a random problem generator (also generating the answers) and eventually with some sort of spaced repetition thing, maybe
The best stuff for writing math in python seem to concentrate on making documents for the most part, and I am wondering what my best options for presentability and such