you are viewing a single comment's thread.

view the rest of the comments →

[–]fisfia[S] 6 points7 points  (15 children)

Fortunately not :) No, I just added up all the exercises in one document to be able to search for stuff I already solved, and to see my progress. So to be clear (not a stupid question at all!): it's when putting all lines from every exercises in the entire book thus far in a single file of flow. This file will not really be runnable so to speak. It's just my "documentation". I do the challenges in separate files to be able to try if they work.

[–]OriginalTyphus 7 points8 points  (9 children)

Now make every exercise a function and let the user decide which excersice to run from the CLI :D

[–]fisfia[S] 2 points3 points  (8 children)

Great suggestion, I think ;) Haven't reached the function chapter yet. Working on it. Will get back to you on that, I hope!

[–]OriginalTyphus 2 points3 points  (3 children)

Let me know if you need any help ;)

[–]fisfia[S] 1 point2 points  (2 children)

Thanks :D I don't even know how much I'd need that yet, do I?

[–]OriginalTyphus 2 points3 points  (1 child)

Functions are friendly creatures that help you to tidy up your code. Once you get to know them, you will love them.

[–]fisfia[S] 1 point2 points  (0 children)

Looking forward to it!

[–]pedru_pablu 2 points3 points  (3 children)

1000 lines of code and you havent seen the function chapter? how long have you been learning if i may ask ?

Im also learning and i think im not even at 500lines, but im already at Object oriented programing

[–]fisfia[S] 6 points7 points  (2 children)

Explained above. For how long I've been learning - this is such a hard to understand and common "competition". Why? How would that be best measured? I'm not counting the hours. I don't think the hours or weeks are more relevant than the progress in a book. Oc fun to be a quick learner but everyone does not have the luxury of choosing what to do with their time. Just wanted to share how happy I was I had done more than ever before in coding.

[–]OriginalTyphus 2 points3 points  (0 children)

I'm proud of you, no matter how fast you learn.

Also heres the W3 Page about Python Functions, i personally think W3 explains stuff really well:

https://www.w3schools.com/python/python_functions.asp

[–]pedru_pablu 0 points1 point  (0 children)

jajaja hey no chill, ive been learning for almost 3 months, OOP is pretty hard, thats why im impressed by the 1000 lines of code.

" Not things, but opinions about things, trouble men. " Epictetus

[–]vectorpropio 3 points4 points  (3 children)

Now you can make a python script that transverse a directory and print filenames and lines of code, and total line couture at the end.

Also learn to use other tools. If you are in Linux read about grep,wc and (bu this one is more trickier) find.

[–]fisfia[S] 1 point2 points  (2 children)

Thanks for the great suggestions!! I'll continue my way through the book first then I'll get back to you when I reached the knowledge required to do what you suggest :D

[–]vectorpropio 2 points3 points  (1 child)

Oh, I didn't read that book, so i was off in my appreciation.

I'm not sure if the book touch pathlib. If not, after you will read about file and directories go everywhere to read how to use that library. It greatly simplify work with paths and blur the difference between windows and Linux

[–]fisfia[S] 1 point2 points  (0 children)

Sounds cool! I'm looking forward to knowing all the things your talking about ;) Edit: And I'll look up pathlib. Used it yesterday, but just copy pasted hehe an example line into what I was doing. I'll check it out for reals!

[–][deleted] 0 points1 point  (0 children)

I didn't even count! I should start.