r/PythonLearning • • 8h ago

I've quit my self paced Python course twice at the same section

I’m learning Python for work. I’ve quit twice at the same spot- the exercises where you write your own functions and loop through dictionaries. The lessons make sense, then the exercise is a blank editor and I just sit there. Nobody at work codes, so I can’t ask anyone.

I’m not attached to this course either, I’d totally switch if something else explains functions better. Does jumping back in at the hard part make more sense than restarting a third time?

12 Upvotes

20 comments sorted by

6

u/PsychologicalToe3289 7h ago

Also - Python Tutor site lets you step thru a loop over a dict one line at a time and watch the values change- helped me see it

4

u/Substantial-Air-2483 6h ago

I tried it last night… seeing the key and value change on every pass was the first time that loop made sense to me. I still can't write one from a blank editor though 😅

2

u/abbylynn2u 5h ago

This is normal for those of use where coding is not intuitive. I had classmates that had been coding since 5th grade...lol

Think of the steps you would write out if you were building a matching game, or tic tac toe, or a simple card game. Write the parts. Then put them in order. I definitely have to work a zillion times harder than everyone else in front of a blank screen. Just keep plugging away at it💕

14

u/Solid_Skill_6317 7h ago

Jump back in at the hard part, restarting just means redoing stuff you already get. When the editor’s blank I write the steps out as comments first, like # loop thru the dict and # add up the values, then put code under each one

2

u/MrMurrayOHS 1h ago

Man, that is a simple but brilliant way of approaching it. Def using this with my students.

0

u/Think_Row7403 7h ago

Once you've got the steps written as comments, does your course give you any way to get a real person to look at the attempt? I had that at Hands On Technology Transfer, a personal mentor who writes software as his day job.

4

u/Lightinger07 4h ago

Why do you need that? You can test it yourself to see if it works.

4

u/TimBrownDev 6h ago

If you want more practice I built a roadmap of the best practice problems I've seen to help teach python timbrown.dev/roadmap

4

u/PureWasian 7h ago

What exactly are you confused about by functions? At a very high level:

inputs --> function() --> output

or you can use functions to abstract pieces of work

output = some_task1(...)
output = some_task2(...)
output = some_task3(...)

3

u/tiredITguy42 8h ago

Start is always hard. We used to have only paper book, which was outdated when they started translatring it (nooone know english well at that time) and super outdated when it got into my hands.

And somewhat it was easier, no pressure, no tutorial hell, but sometimes the book was so bad, you needed to buy another one. I started with HTML and bit of CSS, then touched php. It took me 5 years to finally learn some proper coding as I wasn't very consistent. It was UNI what forced me to learn it properly. Anyway, they do not show you how, they give you weekly projects and you need to do them. This is how you learn, you do the projefct and find out how with small steps.

Maybe you just need some structured learning, maybe find some evening class, with project for each week.

2

u/recentAd1666 8h ago edited 5h ago

I think you should look for another video or course about the subject. Do they have forum or help sont ou can ask a hint? Ultimately ask an AI it can probably give you the answer you can read and study and then reproduce by yourself. You can also copy the problem here so we can give you tips.

2

u/Spleeeee 8h ago

You need a problem not a course.

2

u/zztopsboatswain 5h ago

Write comments to help you keep track of your ideas. Write print statements to let you see everything that goes on. Like when you're looping, have it print the value you're looping over before you try to do anything with it and then again after you do something to it

1

u/Fragrant-Cheek-4273 5h ago

Don't restart the whole course. Try reviewing functions and dictionaries separately, then practice with really small exercises.

1

u/undernamed1101 5h ago

If you succumb to challenges well, why not?

1

u/thequestison 4h ago

Check out the mooc course, it's ending but the course is available to down load.

https://programming-26.mooc.fi/

1

u/Agawell 59m ago

Pseudocode - type out what you want to do as comments

Print() statements - use them to see what’s going on

Functions - use meaningful names just like for variables, for example

radius = 5.4
area_of_circle = calculate_area_of_circle(radius)

This makes the code more readable!!! And allows you to reuse bits of code in multiple places without retyping it

0

u/Brief_Effective1410 5h ago

THE BLANK EDITOR STARE!!! i know it so well. Functions took me three tries too lol

0

u/Otherwise-Reveal7177 8h ago

That's the phase where you become strong and build muscle memory. Stay and think as much as possible; you will get used to it till it gets simple.

Tell AI to explain to you in the simplest terms.

-1

u/Money_Ad_5277 8h ago

Does exercise expect something concrete? Like output or variable with expected content?
If no, just write average function for dictionary as an example. And no one is stopping you from reading additional literature like geekforgeeks, tutorials and so on.

If you have a specific question like "why function doesn't work/this behavior is not expected" with code example you could ask for an explanation here

As for restaring/coming back... I would come back, just out of stubbornness