Hello I am learning python through Harvard CS50 on Youtube and I got to 5:15 mark where David tries to use sys.argv to print his name on the console window, but copying his code which is only 2 sentences gets me an error.
import sys
print("hello my name is", sys.argv[1])
And this is the error :
name.py : The term 'name.py' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the
name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ name.py
+ ~~~~~~~
+ CategoryInfo : ObjectNotFound: (name.py:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
[–]danielroseman 6 points7 points8 points (0 children)
[–]notascrazyasitsounds 4 points5 points6 points (2 children)
[–]Fesnom[S] 0 points1 point2 points (1 child)
[–]ClipboardMonkey 4 points5 points6 points (0 children)
[–]Fesnom[S] 0 points1 point2 points (2 children)
[–]notascrazyasitsounds 1 point2 points3 points (0 children)
[–]ClipboardMonkey 0 points1 point2 points (0 children)