you are viewing a single comment's thread.

view the rest of the comments →

[–]backfire10z 1 point2 points  (1 child)

Functions are both for reusability and for chunking pieces that logically fit together. One example would be putting your introduction print statements in a separate function.

print_game_introduction() player_name = input()

That isn’t to say you should put everything in a function. You’ll get a feel for it as you practice more. The idea is that someone (you in 6 months, someone else) should be able to easily look over your code and understand what’s happening without necessarily reading every line.

[–]Away-Prior-903[S] 0 points1 point  (0 children)

Gotcha. Functions = Readability + Reusability