Ii need help with exercise 13. I am using python 3.8.2 and everytime I try running the code:
from sys import argv
script, first, second, third = argv
print("The script is called: " , script)
print(“Your second variable is:”, second)
Print(“Your third variable is:”, third)
Everytime I run the the code with the instructions from the book (learn python 3 the hard way) I get an error ! I’ve tried all possible ways to no avail. Someone please help. 16112986195741403248363252296310|666x500
This is a totally weird one. Those are powershell errors. As @gpkesley said it’s complaining that it doesn’t know the executable python3.8, but it looks as if your script was run successfully before it complains because the output is there.
Have you changed anything in your setup since when it last worked? Any forced Windows updates? Can you find where your python3.8 exe is installed and then check if the directory is in your PATH?
Hi, can you explain how you’re running the code just so we can be sure you’re not doing it in a way that gets in the way later?
Also, on Windows you can do a screenshot with the Snipping tool. Hit the windows key and type “snip” or type “screenshot” and it will come up. That’s if you want to do an image, but the better way to do it is to copy/paste the text:
Select all of the text in the powershell window with your mouse.
Hit enter and that copies.
Come here and type this:
<ctrl-v here to paste>
Those characters are “backticks”, not single-quotes. Mine is under the ~ character. Once you do this you’ll paste plain text and then we can see it very clearly and it’s faster and easier to do. You can also do this with code you wan to show.