Python 12-22
Python 12-21 In [1]: ## exercise 13 from sys import argv #script, first, second, third = argv script , first , second = argv print ( "The script is called:" , script ) print ( "Your first variable is:" , first ) print ( "Your second variable is:" , second ) #print ("Your third variable is:", third) # instead, do this to hardcode the parameters that will be passed script = "Exercise13" first = "string param1" second = 34 third = 23.5 print ( "The script is called:" , script ) print ( "Your first variable is:" , first ) print ( "Your second variable is:" , second ) print ( "Your third variable is:" , third ) The script is called: C:\Users\nirva\Anaconda3\lib\site-packages\ipykernel\__main__.py Your first variable is: -f Your second variable is: C:\Users\nirva\AppDat...
Comments
Post a Comment