r/learnpython • u/nehaprince3555 • Aug 29 '20
What would be great ways to pratice python ?
I learned python from Udemy : From Zero to Hero by Jose . But I feel that there's little too less to practice in there. Before learning python I had learned light C++ which was part of my high school . My sir would give us many kinds of exercises. Right Now Since I'm learning it on my own I am finding it hard to find practice exercises. (on lists, tuples , OOP, loops, I think the whole bunch).
Thanks :)
11
Aug 29 '20
For the first month or so just watch the tutorials and learn the basic concepts. After that work on projects. Just projects and nothing else. I am telling you this from my personal experience and it has helped me a lot.
1
8
u/Sigg3net Aug 29 '20
Put down the blanket, place the basket in front of you, and unhatch the lid (but leave it on).
Wait for an audience to gather.
Once you've started playing and the python is ready, it will make for a greater dramatic effect, that it opens the lid itself.
I personally prefer the classics (oriental music, Persian and even some Enya), but for internet fame try some Rick Astley or some Breath of the wild tunes.
2
7
Aug 29 '20
I personally open my laptop and think for example "okay today i'm making a script that counts the most-used word in a whatsapp chat" and then start working on it. So I'd say try to come up with many small ideas that you are able to do (don't come and say okay today I will make an app that hacks the pentagon because you'll just make yourself feel stupid). You will encouter tons of bugs that will teach you a lot as well as many new things that you'll learn as you reach the end of your project. Most important thing is to Google each and every question you have and don't give up. Sometimes it seems as though you wrote everything 100% correct but it's still giving a weird output. Don't get frustrated and leave the project, keep searching and you will find a bug hidden deep in your code and you'll learn not to make that mistake next time.
1
u/nehaprince3555 Aug 29 '20
Woah. I never thought you could do that.... I have very little knowledge of what I could possibly do with python. Never thought we could make a script like that could count the most number of words used . I'll try that it's pretty interesting. thanks a lot.
9
u/Diapolo10 I write code for a living -- https://github.com/Diapolo10 Aug 29 '20
ATBS is a good place to get some practical ideas, and I recommend just doing your own projects. Over time you should get an understanding of what works where, and why; just choose to use different types every now and then.
I understand that this sounds like boring advice, but combined with the official documentation I do think it's the best choice
3
4
Aug 29 '20
The best way is too actually build something, i recommend building a website with flask or django or do some machine learning
1
2
u/NisERG_Patel Aug 29 '20
José is the best
1
3
u/makedatauseful Aug 29 '20
Such a soothing voice, I can hear him talking about mammals as he explains class inheritance haha
4
3
3
Aug 29 '20
Maybe it's me, but I found practical things I wanted to do (media organize, download automation, etc.), and then researched how to do them with Python. Felt more hands on and less like learning abstract concepts.
Downside is, I'm sure I don't use best practice methods, and my scripts look janky...but damn, am I proud of them.
3
u/cybersphere9 Aug 29 '20
I would install Jupyter Notebooks on your PC if you're learning.
It makes it much easier to segment your code and step through your code line by line
It's also a good idea to do online courses with others so you can interact with the community as you learn. #FreeCodeCamp is recommended.
2
u/Rentusz Aug 29 '20
Of you have basics, examples and projects the Best Way I think to improve your python
2
2
u/makedatauseful Aug 29 '20
Practice can get pretty boring pretty quickly, I would suggest picking up a real-world project that aims to solve a real-world problem.
2
u/jerryelectron Aug 29 '20
One person's exercise is another person's project. Make your own project, can be anything. Ideally you don't want to be told what problems to work on all your life.
2
u/taladan Aug 29 '20
Also, a little passion project like this will help give you practical feedback in a lot pressure way. Real world experience is priceless.
2
u/thebadassets Aug 29 '20
Build projects. Anything else isn’t going to reinforce the learning like building a project. Also, while building, lean on the library documentation as much as possible, before going to stack overflow.
2
2
u/zolaaa24 Aug 29 '20
What do u think about course: From Zero to Hero by Jose?
I am about to start First Milestone Project. Really excited even is guided.
After it gonna go for Django! What r going next? Web or Data?
Also after i finish want to pratice and hope make own projects.
Best Regards!
2
2
u/developernexus Aug 29 '20
How do you use your computer? Are there repetitive tasks that you find yourself doing over and over? Those are great cases for creating a piece of software, as you have a well-defined goal and are already familiar with the process required.
For example, I find myself needing to convert video files frequently and move them to network storage. So, I created a Python script to watch for new video files in a particular folder, convert them to a specified format, and them move them into network storage. I, also, use a Python script to create a daily backup of my local and server files.
Remember, your practice programs should still be practical, and I've found that solving an issue that you're someone invested in personally will go a long way in the learning process
2
u/crypto_junkie2040 Aug 30 '20
Here are problems I like to implement when I am learning a new language:
word counter- open a file and count all word and get the top most frequent.
web scraper - find some website and scrape it for data.
website and api - find a web framework in that language and get to know what you can do with its http server
Hope it helps and good luck!
2
u/aarondiamond-reivich Aug 30 '20
Highly recommend Project Euler. Lots of fun math riddles that can be answered in Jupyter notebooks. Super easy to get started
2
u/theme57 Aug 30 '20
What I've been doing is converting projects from other languages into python IE I have been working on something in Java, and to learn Python without watching a lot of tutorials (I have a few udemy python courses btw but haven't watched them) I've been coding the same or better functionality in python. If anything holds me up I use google and that's helped me solidify concepts better since it's closer to a real class environment than following a tutorial.
Good thing is by going this route I've realized a lot more I can do with the project like using Django to connect it to a front for a nice full stack project that provides utility compared to making a game like what's recommended in JavaScript project suggestions or even Java.
Just my 2 cents and to add too (sorry for the ramble), make something in Python that you'd personally use or think could be done better for a different or less tech savvy user.
2
2
u/Python-3 Aug 30 '20
Something that has helped me is finding little projects on Github and just figuring out how they are working. Go step by step through the code execution and just learn whats going on and how other people do certain things. Has helped me tons.
Also taking down little snippets and doing your own little examples of some of their methods also helps me learn/remember them better. Then I can always go back and look at the snippets I took down.
2
2
u/haha1234346364 Aug 30 '20
You can set a goal for yourself, like mine is to write a chat server using python twisted, even though I can't seem to install twisted.
2
2
0
Aug 29 '20
[deleted]
2
u/nehaprince3555 Aug 29 '20
I am doing my undergrad in physics but I always loved programming. I'd probably jump into something related to the same. Thanks for the tip.
1
u/grammarGuy69 Aug 29 '20
Have you done automate the boring stuff? If so, how does it compare to the course op mentioned, I've heard a few people reference it and I was wondering if it's the same kind of stuff and I should just skip.
2
Aug 29 '20
[removed] — view removed comment
1
u/nehaprince3555 Aug 29 '20
Yes I will. I'm doing an undergrad in physics. I think Data science is something I can opt for. But I find all of them really interesting.
2
Aug 29 '20
[removed] — view removed comment
2
u/nehaprince3555 Aug 29 '20
I have heard of IOT it's used to automate houses, I think. Again it's a great suggestion. Thank you. :)
223
u/ASIC_SP learnbyexample Aug 29 '20
Exercises:
Exercism, Practicepython, Edabit — these are all beginner friendly and difficulty levels are marked
Codewars, Adventofcode, Projecteuler — more challenging
Checkio, Codingame, Codecombat — gaming based challenges
/r/dailyprogrammer — not active currently, but there's plenty of past challenges with discussions
Practical Python Programming — for OOP
Projects:
Projects on various topics with solutions
Project based learning
Pytudes by Peter Norvig
Rosettacode