r/learnpython • • Sep 13 '24

Freshman in college still no clue about python

I am a freshman at Georgia State with a CS major. I have been paying attention in class but always feel lagging. Everyone knows at least the basics of Python except me. What are the best resources to learn Python from scratch and be in the top 10% of the class?

0 Upvotes

40 comments sorted by

12

u/[deleted] Sep 13 '24

I have been paying attention in class but always feel lagging.

How much code have you written outside class? Programming is like anything else, you have to practice. It's similar to being an aviation mechanic. If you have intensively studied the tools, know what they are for and when to use them and not use them, but have never used them to tear-down and rebuild an engine, then you aren't qualified. To learn programming you have to write code and solve problems - a lot.

What are the best resources to learn Python from scratch and be in the top 10% of the class?

Depends. If you aren't too far into the course you could review your notes and try to catch up that way. Or you could use one of the free learning resources in the wiki in parallel to lectures. Either way catching up from behind is difficult so you have to apply yourself. Getting to the top 10% is possible but depends on how much aptitude you have and how much effort you put in. It's up to you.

1

u/UtkarshPatel419 Sep 13 '24

I am trying my best. Started to learn through YouTube today. Let's hope I catch up soon.

5

u/[deleted] Sep 13 '24

Started to learn through YouTube today

Just watching a video doesn't work for most people, even if it's a terrific video. You have to write code and solve problems. You want something that has exercises you can try.

2

u/Thomasjevskij Sep 13 '24

This is the most important piece of advice you'll get on the topic. Programming is a craft. Doesn't matter how much you understand from lectures etc. You just gotta make stuff. Can't come up with things to make? Start off with class exercises or beginner puzzles. I love Advent of Code but it gets tricky after a bit.

I've also considered making scripts that go through my monthly bank transaction list to make statistics and budget. I've made scripts to move files via SSH from my laptop to my media server. Sky is the limit. But you'll also be just fine for a good while doing exercises from classes. Just remember that it's a craft and you need to practice your skill alongside your theoretical understanding. Those two will help each other.

2

u/ExpensivePanda66 Sep 13 '24

YouTube and hope are not paths to learning something properly. You gotta do.

1

u/PapaChimo Sep 13 '24

Check out “Automate the Boring Stuff”, the book is online for free, by the author.

Great place to start and should have you caught up quickly

7

u/[deleted] Sep 13 '24

You need to practice writing code. Attending lectures won’t make you a programmer

1

u/UtkarshPatel419 Sep 13 '24

I think I'm realizing it now, learning concepts from YouTube.

4

u/hugthemachines Sep 13 '24

In some ways, programming is like carpentry. Imagine being a carpenter and saying "I am attenting many carpentry lectures and reading lots of books, but I don't seem to be a better carpenter".

What's missing is practice and solving problems, any problems you can think of.

3

u/Murphygreen8484 Sep 13 '24

YouTube, Udemy, Codecademy, Reddit.

What are you currently learning in class?

-2

u/UtkarshPatel419 Sep 13 '24

Idk shit about what's going on. Today, the professor just wrote A to Z and was writing some code to locate it or something. He wrote something, and in brackets, he put this (2:10), and it gave output of BCDEFGHIJ.

4

u/Murphygreen8484 Sep 13 '24

Sounds like lists and slicing. Though I suspect he used square brackets [ ] for that. It helps if I know what the exact example is/was and then I might be able to help explain it.

0

u/UtkarshPatel419 Sep 13 '24

Yes, yes, it was square brackets. He was explaining stuff like the space counts as 1 and something like that.

10

u/[deleted] Sep 13 '24

Are you lost or just don’t care? I’d highly suggest doing Harvardx’s CS50p for Python. I’d also suggest reflecting if this is that path for you. CS is just one of many paths for tech fyi. A math minded person does well in business, especially business analytics.

1

u/Dickus_minimi001 Sep 13 '24

As a noob to programming wanting to learn python this I learnt first day on cs50,

2 means third place as computer count from 0, and 10 means 9, And hence if it's a strong say abcdefghijk

So if I say print(x(2:10)), where x="abcdefghijk" prolly wrong syntax etc

It will print cdefghi only

Correct me someone if wrong.

3

u/Murphygreen8484 Sep 13 '24
alpha: str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" 

lets_two_through_nine: str = alpha[2:10]

print(lets_two_through_nine)

One thing that used to trip me up, you use 10 in the example above, but it's not inclusive - meaning it goes up to 10 and stops without including the 10th letter.

Also strings are iterable, meaning you don't technically have to turn it into a list first (again, like in my example above)

2

u/UtkarshPatel419 Sep 13 '24

Oh yes, this is it. I felt so confused and demotivated today when everyone already knew it. But I've started a YouTube course today. I will surely master that stuff soon.

2

u/Murphygreen8484 Sep 13 '24

Oh oh and don't forget everything is zero indexed - so letter "A" is 0. So slicing at 2 starts at "C"

1

u/UtkarshPatel419 Sep 13 '24

Oh okay, thank you so much, that helps a lot.

2

u/Archit-Mishra Sep 13 '24

Well I can sum up what python is

Python is the written medium which is use to tell other people what we want to tell to the machine to do. ¯⁠\⁠_⁠(⁠ツ⁠)⁠_⁠/⁠¯

Lol but on a serious note, the best practice would be to write the codes yourself. Like don't just think, write a simple code even if the program is very simple (it's not like you need to write production level code yet), and try all the variations of it that comes to your mind. This will cause you to explore new stuffs.

For begging, you can watch some Youtubers to learn the basics like Fireship's Python in 100 (which won't teach you any such concept but is interesting), or Code With Tim, Bro Code etc. Also try to avoid watch too long videos (like the videos that are like 5hrs, 10hrs, ofc until and unless it's from freeCodeCamp.org).

Also you can refer to Harvard CS50 (tho I'd suggest you to be careful watching this, since although good, bur the videos are pretty old, so some of the stuff taught there might not work for you so don't panic). You can also visit freeCodeCamp.org (both on YouTube as well as Chrome).

Rest, there are some books too that you can read, although if you are going for the reading part I'd suggest you to rather read the documentation.

Also what's the problem that you're facing in grasping exactly? Like are you not able to understand the syntax, or are not able to remember the keywords, or do you not understand how python itself works, or some problem in understanding any algorithm?

PS: Oh yeah almost forgot to touch this, but if you aren't already, my recommendation would be to use an IDE. You can go for Pycharm if you just want to focus on Python. Pycharm is probably the best and most powerful IDE for Python, tho it might feel a bit heavy initially but the rest is fcking amazing in it. Or you can go for VS Code, if you want the lightweight "feeling" (lol VS Code being built on Electron isn't exactly lightweight). Also VS Code, unlike Pycharm pretty much support every language (literally every language).

2

u/UtkarshPatel419 Sep 13 '24

I am having a problem understanding the whole thing. The professor may not be good because the YouTube guy is explaining it well, and I can grasp it better. Let's see how far I go.

41

u/MooseBoys Sep 13 '24

I’m a freshman in CS

Doesn’t that mean you started school like nine days ago? Give it some time ffs. Meet people, go to parties, enjoy yourself.

8

u/LorenzoTettamanti Sep 13 '24

The most important thing is to challenge yourself and never stop learning

1

u/FantasticEmu Sep 13 '24

I take it you have no experience programming in any language otherwise I don’t think you would be lost with python since it’s pretty self explanatory.

If that’s the case, maybe this book is a good starting place https://automatetheboringstuff.com/

1

u/UtkarshPatel419 Sep 13 '24

That helps, thank you so much.

3

u/Puzzleheaded_Tree404 Sep 13 '24

Just youtube it. So many resources available for free. You're either motivated to learn or you're not.

2

u/Za_Worldo-Experience Sep 13 '24

The best resource is reading Documentation. Programming is a way of thinking, and can’t just be developed over night.

Read what something does and spitball how you could use it in a professional setting. Your imagination will be your best friend. Think about how something is programming in your daily life, like stop lights: how would you write one?

Just gotta adopt the mindset, like starting a sport in Highschool. Will take you a bit to get to the even playing field but from there you will excel where you choose.

2

u/LorenzoTettamanti Sep 13 '24

Start with youtube videos to learn the basics. Learn basic data structures and algorithms. Learn pandas,numpy,matplotlib. After that move to concurrency and more complex libraries like tensorflow, keras, opencv, etc..

2

u/ExpensivePanda66 Sep 13 '24

You learn by doing.

Go write some programs until it starts to click.

2

u/Unlikely-Sympathy626 Sep 13 '24

Your headline did it for me.

5 years in. Still no clue about Python!

2

u/kemb0 Sep 13 '24

People will maybe hate on me for saying this but I just started learning Python last week and you know what's helped me learn way faster than any book or course, using Chat GPT.

Now before people leap to saying it, yes I know all the arguments against it but let's face it, learning from a book or course can be sooooooo boring. I've tried learning various languages in the past from those and they have never ever worked. I give up within a few chapters. I think they're just too slow. You can't pick and choose what you learn but have to go over stuff that you already know the basics of in the order that the author prescribes but they take up like half the book. You don't want to skip them in case there's something in there that you didn't know, but by not skipping those parts, you end up just fatigued and bored out of your mind. Books aren't clever. They don't know what you know already. Same for videos. You're learning from someone that has no connection and interaction with you. They know nothing about you and there's nothing they can do about it.

So sure we can bash someone for not learning a new language "the right way" but if someone is really struggling, maybe "the right way" just isn't working for them.

Enter ChatGPT (no this isn't an ad!). I wanted to make a quick app for a specific use case I had. I don't care if it isn't perfectly coded or has bugs, so long as that core functionality works and I can write it rapidly without spending years having to learn Python first and ultimately giving up out of boredom. I wasn't even especially interested in learning python. I just wanted something to solve my problem fast.

I gave the AI small tasks and slowly built up the code bit by bit from the answers it gave me. Within just a couple of evenings I had fulfilled my original needs. But now here's the great bit that I've never experienced trying to learn to code: I was finally enjoying myslef. I found myself starting to tinker. I found myself wanting to better understand what parts of the code were doing. I started to expand on my original feature wishlist. I started to want to appreciate what the code was doing and find ways to make it more efficient.

None of these things I've ever experienced learning to code because every time it either took way too long to get to the point of being able to even start making the thing I actually wanted to make, or I find that every step I'd have to go off on a tangent, researching some functionality and a whole evening is gone just trying to fiugre something out. So then come the next evening I look at my computer and think, "God no, not again."

Now for the first time I can't wait to get home and implement more features and slowly build up my python knowledge. This is a game changer for me.

1

u/Fred776 Sep 13 '24

There isn't any short cut. You need to write code. You will make a lot of mistakes but that's how you learn.

Go over your notes and try to identify the bits of Python you have covered in lectures and write little programs to try everything out and make sure you understand.

If you get stuck on something you can always ask questions here but you need to get to the point of being able to ask specific questions and that needs you to do some work first.

1

u/bill0042 Sep 13 '24

Find a project to do to get practice. I learned a lot by developing an app related to a video game I play. Maybe something like a personal budgeting app that reads transactions downloaded from your bank and stores data in json files or a sqlite db. As you learn more you can go back and improve it.

1

u/jkh911208 Sep 13 '24

you don't have to know anything about it during the freshman year. enjoy your life for 1 year

1

u/iovrthk Sep 13 '24

I'm just going to be blatantly honest., in hopes that it helps.

Now a days, people cut and paste their way to a place they don't belong. How are you a CS Major and you don't know Python?

Python, is a programming language that was written to most, closely resemble the human language. Python, is one of those languages that you can just guess when it come to syntax. The biggest challenge with python, is spacing. If you do not count your spacing and something get off, your code will not function.

Get a python for dummies book. Read it and actually type with your hands. Do the exercises. Don't cut and paste and pretend you understand your way to the top.