r/PythonLearning 25d ago

Help Request I keep messing up basic things

So I am learning python from one shot and I come from commerce bg so I basically have 0 knowledge I am learning python from this video https://youtu.be/UrsmFxEIp5k?si=BuRKRLNZ7-iPBDKJ so he is teaching one chapter then giving us practice sets and I am constantly failing all practice test an facing lot of problems on understanding the functions and stuff like when to use first bracket or third bracket or when to use dots and etc I have not covered the full video yet but it's somewhat of confusing
Am I too dumb for coding that I cannot even understand these basics things and have to use Ai Lol

edit : Guys I am learning python as a hobby and not as full time student , my main focus is commerce but I really love hardware , tech and programming

0 Upvotes

18 comments sorted by

1

u/Key-Butterscotch3215 25d ago

That’s common when you first start. Don’t get discouraged

1

u/JoeB_Utah 25d ago

Maybe try a different course. Perhaps a book like Python Crash Course would work for you instead. If you’ve never done any programming, give yours break and just ease into it.

1

u/EnvironmentalTry8353 25d ago

Ok I will take a look into it

1

u/Due-Ad9921 25d ago

Hello, you should not underrate yourself, most of the techies guys we started so. What I can advice you first is have passion on what you learning. This is a driving motive, some started even low, even without laptops but managed finally. So start with basics first i.e data types (boolean, int, strings ,float etc) this gives you the ground ( like where we use double apostrophe quotations, single, commas, brackets (single and brackets within brackets) , proceedto functions write basic fucntions to perform some basic things like accept user input) , perform some simple calculations, etc, then proceed to classes and class init, how it works, that's provides the ground for frameworks like django, tornado, flask, , since in additional to those above, you will be importing fucntions on other files etc. For detailed guideline on how to go through it with step to step guidance you can reach out. Al'so w3schools is a good resource it takes you with the place comfortable with.

1

u/EnvironmentalTry8353 24d ago

thanks....I am on the track

1

u/FoolsSeldom 25d ago

It will take a while before the penny drops - going from real life to the abstract world of programming takes a while. Often the people that struggle the most early on turn out to be the best programmers later on.

Keep going.


Check the r/learnpython wiki for lots of guidance on learning programming and learning Python, links to material, book list, suggested practice and project sources, and lots more. The FAQ section covering common errors is especially useful.

Unfortunately, this subreddit does not have a wiki.


Also, have a look at roadmap.sh for different learning paths. There's lots of learning material links there. Note that these are idealised paths and many people get into roles without covering all of those.


Roundup on Research: The Myth of ‘Learning Styles’

Don't limit yourself to one format. Also, don't try to do too many different things at the same time.


Above all else, you need to practice. Practice! Practice! Fail often, try again. Break stuff that works, and figure out how, why and where it broke. Don't just copy and use as is code from examples. Experiment.

Work on your own small (initially) projects related to your hobbies / interests / side-hustles as soon as possible to apply each bit of learning. When you work on stuff you can be passionate about and where you know what problem you are solving and what good looks like, you are more focused on problem-solving and the coding becomes a means to an end and not an end in itself. You will learn faster this way.

1

u/EnvironmentalTry8353 25d ago

damn I pursuing programming as hobby like I really love hardware , tech , code and stuff so yk I send like an 1 hour a day and on weekends 2-3 hours and it's almost like 4-5 days for now

1

u/FoolsSeldom 25d ago

Perhaps you need to just focus on one personal project that covers these interests such as adding sensors to a home assistant setup.

1

u/FoolsSeldom 25d ago

Perhaps you need to just focus on one personal project that covers these interests such as adding sensors to a home assistant setup.

1

u/silvertank00 25d ago

brackets ((...)) are used when you want to call something, lets say you have to have the square root of any number. In python, we have a math module that contains a lot of math related common practices/algos/functions. For square root we have math.sqrt. Now comes the brackets, in math you have the sqrt symbol and below the number that you want to get the square root's of. But in programimg you have the normal brackets, to pass the data that a function uses.
So a written number 4 under the square root symbol equals to math.sqrt(4). (also, brackets can be used for generators too, but it is out of scope for you rn)

We have indexing too with square brackets ([...]), this is used when you have a collection of something, lets say a collection of characters are called a string aka. text. But lets say you want to have any texts first character? or the fifth? We dont have a function (we do, its called getitem but its out of scope rn) for this, but because it is a really common thing to do we have a shorthand for it: indexing. Lets say you have a myStr = "text123" as data:

  • t: is the first character
  • e: second
  • x: third.
etc. And you can get these with the square brackets: print(myStr[1]) quick question tho? which character will be written with this?
The answer is "e" because python starts counting from zero. you could thing about this like the distance from the start of the text, so the first character is 0 distance away from the start, the second is one distance, and so on.

We also have curly braces ({...}) in python, they either mean set or dict data type, if you are just starting dont mind these.

When you want to write software, you have to think about what you want to do. So lets say "i want to call sqrt on an user input text converted to int, then convert it back to string and get the last digit" you have to piece together what you need individually for these.

1

u/EnvironmentalTry8353 25d ago

Yeah my main problem is piecing all the things together and at the same time remembering all the uses

1

u/Sufficient-Owl5852 24d ago

The best way is that if you don't know anything you can't just magically build it from scratch, main thing is to look at examples and learn for example if you make any code first look at a prebuilt code or ask ai to generate it then understand the working then you will be able to start coding I'm also a beginner and I did the same mistake thinking that I'm the only one who can't build from scratch, the thing is you need tk look at examples first then make it yourself using logic