Exercise 23. I can't understand anything

I don’t understand what is going on in exercise 23.
There are so many arguments passed to functions and print statements that add to my confusion.
Can someone please help me understand this step by step?

I am following the book for Python 3.

Hello @toppythoncoder.
You haven’t skipped any study drills? I did so the first time I went through Learn python the hard way. I found it more and more difficult to do the next exercise. Eventually I started over. Then I did all the study drills and a little bit more sometimes.

In exercise 20 you have “argv”
And in exercise 21 you have “parameters” and “arguments”
Do a lot of practice with these so your really understand what they do. How to use them.
You have these in exercise 23.

But it is a difficult one. Zed wrote a “warning sign” in there saying its a hard exercise.
Frustration and confusion is just normal reactions before understanding this.
There is a lot of post about this exercise in this forum. Read them too.

Good luck

1 Like

So, that code is hard, but what I suggest is just get it working by copying it exactly. Then, put down all the things about it you don’t understand in your notes, and continue with the book. As you do you’ll start to understand what it does. You should also see if there was something covered previously that you missed. As @ulfen69 says, argv is covered earlier, so go see if you understand after re-reading it.

1 Like

I kind of understand it now.
I find it very difficult to work with so many different variable and function names. It is very confusing :pensive:

Thank you for your response. I kind of understand it now.
Never had issues with argv :slightly_smiling_face:
I find it very difficult to work with so many different variable and function names. It is very confusing :pensive:

I have issues with Ex 35 now

Well, programming is all about lots of functions and variable names. I suggest you get a notepad and take notes. It really, really helps.

Also, I replied to you on that one. I think you may be going too fast. You were on 23 with this post, then suddenly you’re on 35 and you have a fairly basic mistake. You just have your code not indented far enough. If you were doing the book correctly and taking your time you’d easily see that your indentation levels don’t match mine. My general advice to you is slow down. You’re not really learning anything by trying to blast through the book.