There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply () below.
If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.
Join the Discussion. Help a fellow learner on their journey.
Ask or answer a question about this exercise by clicking reply () below!
Agree with a comment or answer? Like () to up-vote the contribution!
Hi there, does anyone know what the import os does in this excercise? How does it function within the codecademy environment?I’ve read about it in the pydocs, but didn’t understand everything of it. Does it let us simulate an os so we can create folders and files?
In the Default Arguments module - you can set default values. In the example you can then pass only 1 argument to a function with two parameters. Is there a way to pass only one argument that is the second parameter and then has the default in the first?
For Example:
def create_user(username=None, is_admin=False):
create_user(True) is known as positional argument, given the position of the argument determines the parameter belongs to.
create_user(username=None, is_admin=True) is known as (If I am not mistaken, been a while since I have done python) as keyword arguments. Given we now rely on a keyword rather then position for the arguments to match with the parameters.
I believe we can even do:
create_user( is_admin=True, username=None)
would be a illogical thing to do, just showing the possibilities.