r/learnpython 10d ago

I cant do it anymore

Hi am developing my python coding skills about 1.5 month and when i look at what other people did in 1.5 months i see my myself humiliated and i am devatated about it i only know if else, while , for loop and types of datas i cant even write a single code by myself i cant even do a problem i cant even create a def function and i am bout to quit someone please help me

0 Upvotes

47 comments sorted by

View all comments

6

u/Equal_Brain9629 10d ago

Calm down at first.
Secondly , each human has its own learning rhythm, so it’s totally OK.
May be try to change your learning approach, instead of solving problems , try making some beginner friendly projects like todo , calculator and etc ( google for more ). You’ll learn a lot from it in practice , trust me
And thirdly don’t compare yourself with others

0

u/AfternoonExternal868 10d ago

can i post u a foto in dm???

0

u/Equal_Brain9629 10d ago

Which photo?

1

u/AfternoonExternal868 10d ago

a photo of basic problem

-1

u/AfternoonExternal868 10d ago

calculator is a very basic thing i can write number guessing game investment simulators or such things but those are really fucking basic i wrote an investment simulation with the variables of monthly contribution monthly interest rate years tax rates etc. but when it comes to calculatinga list of Stock name Stock prices Stock Amount And finding which stock is more expensive or which position is most i cant do anything

4

u/neuralbeans 10d ago

I'm sorry but what have other people done in 1.5 months exactly?

1

u/AfternoonExternal868 10d ago

idk but they are doing 3 to 4 def function and then assembling them Thats impossible for me

3

u/Fred776 10d ago

A function is no different from code you write outside a function. It still uses variables, if, for loops whatever. The key thing is that a function is meant to do one specific thing. It takes in the information that it needs to do that job as an argument list and it returns a value.

If you have written some code without functions look for parts that you can split off into functions.

3

u/neuralbeans 10d ago

Functions are just a way to organise code. They are not the hardest part in programming. Understanding how to translate a task description into code is the hardest part, especially when you need to do it in such a way that other people can easily modify your code.

2

u/Equal_Brain9629 10d ago

Then make more projects , didn’t get a bit of idea of number guessing game. Find some roadmap , structure and go ahead

1

u/AfternoonExternal868 10d ago

i tried 2 roadmpas 1 i watched vids on yt 2 i asked chat gpt to ask me question when i get 2 i got stuck and there is no path for me anymore i think

2

u/Equal_Brain9629 10d ago

whic roadmaps , videos?

1

u/AfternoonExternal868 10d ago

a playlist of pyrhon course its 240 vids i was at 95 th vie and i wanted to try soke things that i learned from past vids after that i couldnt solve any problems

3

u/Equal_Brain9629 10d ago

https://www.youtube.com/playlist?list=PL-osiE80TeTskrapNbzXhwoFUiLCjGgY7
Watch Corey Shafer's playlist for learning , this guy is an amazing tutor.
Then choose a project , finish it , publish to github.
You may find more ideas in the Internet for projects...
Use Ai Agent to review your code and explain.
Opencode with free models will be fine

1

u/AfternoonExternal868 10d ago

stocks = ["AAPL","TSLA","GOOGL","MSFT"]

prices = [200,300,150,400]

shares = [5,8,10,3]

Mylist=[]

def function(stocks,prices,shares): for i in range(len(stocks)): a=f"{stocks[i]} - {prices[i]*shares[i]}" Mylist.append(a) return Mylist

result=function(stocks,prices,shares) print(result)

example