13,420
edits
Changes
→PART 2 - Arguments
:#Modify '''lab2c.py''' so that it uses '''sys.argv[1]''' and '''sys.argv[2]''' instead of the '''input()''' functions that was used in your previous ''lab2b.py'' script.
:::*The script should have a '''Shebang line''':::*The script should contain import sys:::*The script should use a variable called "'''name"''':::*The script should use a variable called "'''age"''':::*The script should use '''sys.argv[1] ''' (first argument):::*The script should use '''sys.argv[2] ''' (second argument):::*The script should store the values in the correct variables(including case sensitivity):::*The script should print the EXACT OUTPUT as shown(including case sensitivity):::'''Sample run 1:'''<source>
run lab2c.py Jon 20
Hi Jon, you are 20 years old.
</source>
:::'''Sample run 2:'''<source>
run lab2c.py Jen 25
Hi Jen, you are 25 years old.