reset password
Author Message
apena78
Posts: 16
Posted 14:44 Dec 10, 2019 |

For HW 2 extra credit #1 - Should the program still have a hard coded option to read the file in-case the user does not enter a .csv file name in the command line?

And once we have everything running, should we just turn in the .py file and our .csv? I assume he will know we did the extra credit?  

LuisG72
Posts: 36
Posted 14:48 Dec 10, 2019 |

The way I did it was, it aks the user if they want to use a custom csv. If they dont it uses the hardcoded option. I also just turned in the csv and py file. 

msargent
Posts: 519
Posted 16:52 Dec 10, 2019 |

For extra credit, it has to be passed in as a command line argument. Don't ask the user for it. Pass it in as a command line argument when you first call the program.

e.g., I could run the program like this:

$ python myprogram.py students.csv

If you are unfamiliar with command line arguments, please google it. It's different than asking user for input after the program is running.

Last edited by msargent at 16:54 Dec 10, 2019.
LuisG72
Posts: 36
Posted 05:39 Dec 11, 2019 |

Mark can we assume that both the hardcoded CSV file and command line CSV file will be in the same folder as the python file?

 

also just FYI on HW2 for Extra Credit #2 you put Write a PUTHON function its pretty funny 

Last edited by LuisG72 at 06:10 Dec 11, 2019.
msargent
Posts: 519
Posted 11:20 Dec 11, 2019 |

That's fine.

LuisG72
Posts: 36
Posted 11:35 Dec 11, 2019 |

Thanks