Write a script that print the first parameter given to the script.
Warning
You should work on this exercise with your own installation of Python, on your computer. Learn how for Mac OSX or Windows.
If there is no parameters given, it should print the following error message on stdout:
usage: python3 solution.py PARAM
Maybe you'll need to import a few modules in your program.
julien@localhost$ python3 solution.py antoine
antoine
julien@localhost$ python3 solution.py julien
julien
julien@localhost$ python3 solution.py
usage: python3 solution.py PARAM
julien@localhost$
if: https://docs.python.org/3/reference/compound_stmts.html#if
sys.argv: https://docs.python.org/3/library/sys.html#sys.argv
There's no corrections yet, hit the `Submit` button to send your code to the correction bot.
Keyboard shortcuts: