Tip: Start typing in the input box for immediate search results.
Bite 2: Functions, global and local variables
In this Bite we are going to learn:
1. How to create functions
2. Understand global and local variables
3. Create the first bit of our game
Jupyter Lab notebook available here.
With what you just learned, can you create the program below using functions?
You will create two functions: “intro” will contain the introductory text and “username” will contain the part where we ask the user for their name.
You will then greet the user by their name outside both funcions.