Anonymous user
Flash card challenge: Difference between revisions
m
Reverted edits by 31.25.3.98 (talk) to last revision by Jesstess
imported>Jesstess |
imported>Jeremyb m (Reverted edits by 31.25.3.98 (talk) to last revision by Jesstess) |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 1:
[[File:Flashcards.jpg|right|300px]]
== Project ==
Line 117 ⟶ 119:
=== Step 5: Get the quiz questions file from the user===
Write the code to get the quiz questions file from a command line argument. Handle the case where a user forgets to supply a file; in this case, print an error message saying they need to supply a file, and then exit the program using the <code>exit()</code> function.
<b>Step 5 resources</b>:
Line 134 ⟶ 136:
Try out your script on the following quiz files:
* http://web.mit.edu/jesstess/www/IntermediatePythonWorkshop/metric.txt
* http://web.mit.edu/jesstess/www/IntermediatePythonWorkshop/french_food.txt
Does your script handle the case where the user forgets to provide a filename?
Line 147 ⟶ 149:
===Congratulations!===
You've implemented a substantial, useful script in Python from scratch to help people study. Keep practicing!
[[File:Fireworks.png|150px]]
[[File:Balloons.png|150px]]
|