If you haven't yet, make sure to build out the command-line game following the instructions from a few lessons earlier. Make it exciting!
Once you've got a working version done, show it to your friends and family and let them give it a spin. Feel free to share a link to your game on Discord!
Section Summary: Input and String Formatting
In this section on user input and string formatting, you learned more important programming concepts:
- Collecting user input with
input() - Looping with
whileloops - Changing the flow of execution in loops with the loop keywords
breakandcontinue - Formatting your strings
At this point, you've covered all but one concept that you encountered at the beginning of this course in the guess-the-number game:
What's Next
The final puzzle piece that is still missing is how to import and use code that other people wrote. In the guess-the-number game, you used a module from the built-in standard library called random, which allows you to introduce some randomness into your code. This can be fun and helpful, especially when you're working on games.
In the upcoming section, you'll learn how you can access and use code such as the random module and dramatically increase what you can build with your code by climbing on the shoulders of giants who came before you and built code logic that is powerful and user-friendly to work with.
You'll use one of such modules, called pathlib, to automate some tasks right on your computer's file system using pure Python.