Programming seems pretty cool and i've made numerous attempts at learning python but every time i get to a brainlet...

programming seems pretty cool and i've made numerous attempts at learning python but every time i get to a brainlet tier problem like displaying all numbers from 1-100 I just blank out. this is depressing. wat do

Other urls found in this thread:

see.stanford.edu/Course/CS106A
twitter.com/AnonBabble

Learn the fundamentals of Problem Solving, you know what they teach you in school.

just like everything in life: practice more.

do code academy. ready books. go on project euler and solve problems

for x in range(1,101):
print(x)

same

>programming seems pretty cool
This is my favorite thing about programming, how normies think it's all cool and instant gratification magic that they can pick up in a few minutes by doing a couple examples on 'code academy' or watching a Karlie Kloss video on youtube only to discover to their horror that none of what they try works because there are a million autistic little details they assumed just took care of themselves automatically.
The basic irony to the popular opinion of programming is they confuse the end product with what's required to create the end product, and the laziness and lack of appreciation for detail that attracts them to try it out are exactly the qualities that will keep them from getting anywhere with it.

So with that in mind, those autistic little details that seem to go above a normie's head are the missing pieces to this? Consider what at first seems invisible or intuitive?

Stop thinking about a computer as a mysterious box that "just does". It's no different than your own brain. How would YOU "print out" all integers from 0 - 100? There are two main approaches:
1)Hold a number in your head. Starting from 0, print the number, then increment by 1. Repeat until you print 100.

2a)Write down all numbers sequentially (keep the sheet so it can be reused), then append a designated STOP character. Put your finger on 0, print it. Move your finger to the next number, check it against your STOP character. If it matches, stop writing. If it doesn't, repeat the process.
2b)Do the above, but make your stop character 100, and check whether you should stop after you've written, not before.

The first is a for loop. Set a variable to 0, do some thing with it, increment it by 1 and check it against some condition. Like being less than 101. The second is a null terminated string. Your finger is a pointer, the numbers on the sheet are addresses that happen in this case to store the same value as the address. The address 52 can be simply 52, or 0 + 52(ie ptr[52]).

The computational machinery the universe is capable of supporting is finite, and you see examples of the above in nature. Your own brain performs signal processing in similar ways, DNA polymerases read in 3's and respond to stop codons, a designated signal to stop reading. Etc. It's all simple and no different than the problem solving you do yourself, everyday, everywhere else. You just need to learn to use the language to do it, and then later learn how to do it efficiently.

I recommend C personally. C++ as well.

Thank you

95% of programming is problem solving. They aren't assembly line workers, they're investigators and architects. You have to be a good problem solver first and foremost, some people are simply just not.

I will frame my thinking around this when I give another go at this problem

see.stanford.edu/Course/CS106A

thank you user

for x in range(101):
print(str(x))

here u go brainlet

How does one git gud at problem solving? I went to a shit school and it shows

practice
practice
practice
practice

print(range(1,101))

If you're working on a program and one particular part of it is giving you trouble, stick a pin in it. Save it for later. You'll find doing the rest of the program, that hard part may be easier to figure out later one.

Also, dat feel when you've learned all the basics, and start examining everyone else's code and they do the same thin in 1 line that'd take you 6 lines of code. It made me feel like a brainlet and want to never code again.
Just keep practicing OP. No matter what just keep practicing. You can only get better with time.

>t someone who doesn't know python.
Use a tab buddy

Don't start with Python. I had the same problem, I didn't understand what was going on and all the online tutorials just teach you to import libraries and use them. If you have a specific project in mind and you just want to get it working as soon as possible, I'd say stick with Python, but if you're interested in programming solely as an intellectual endeavor, or if you're simply more patient and want to understand how things work, I recommend you stop learning Python for now and give C a try. I remember a lot of online advice steering people away from C because it's "too hard", but I found it simpler and less confusing. You understand how and why everything works, and build things up from the bottom. It gets more complex the more you delve into things, but on the very surface it may seem more simple than Python

Second this. I'm going through project Euler problems with C. Although, it is much harder than with python so far.

Hit my nail right on the head with this one

Don’t do it if you don’t like it