Running Simple Python Scripts


I get stuck at Running Simple Python Scripts can anyone help me

1 Like

What is Chech for arguments passed to file?

The arguments mentioned are the terms that follow the script at the command line.
In your example:

$ python John Doe

“John” and “Doe” are arguments that are used by the script to construct the output:

First name: John
Last name: Doe

Inside the script, sys.argv[1] contains first argument, and sys.argv[2] contains the second argument.

The first test say its incomplete what is wrong in the code?

Try writing Python3 John Doe.

Thanks Bro it worked

1 Like