Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDinko Galetic <dgaletic@everflame.(none)>2010-06-26 18:17:16 (GMT)
committer Dinko Galetic <dgaletic@everflame.(none)>2010-06-26 18:17:16 (GMT)
commitd33d9ae50870162cab80b08e82169e89018a9d1b (patch)
tree6feea3117eb42ab541fd6f8908332e95cff65050
parent32fe0f5b6b84922a8654b7d38a916898b2fc0050 (diff)
introduction.py: Fixed a few style/grammar things. Added a few TODOs.
-rw-r--r--library/introduction.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/library/introduction.py b/library/introduction.py
index 21134ba..5441fad 100644
--- a/library/introduction.py
+++ b/library/introduction.py
@@ -1,3 +1,4 @@
+# TODO: options to quit, save progress and resume the tutorial.
def run():
print """Hello there, and welcome to PyTutor.
Before we continue, please tell me your name. You can type it in right here:"""
@@ -12,14 +13,14 @@ Before we continue, please tell me your name. You can type it in right here:"""
answer = raw_input(">>> ")
if answer == "no" or answer == "No":
print "Please enter your name again: "
-
- print "Hello again, " + name + """. Before you is a set of lessons about computer programming, or just "programming" for short. I will present them to you and guide you through them. You can also read them yourself without my guidance (*somehow*).
+ # TODO: Reading the whole text without guidance.
+ print "Hello again, " + name + """. Before you is a set of lessons about computer programming, or just "programming" for short. I will present them to you and guide you through them. You can also read them yourself without my guidance.
If at any time you wish to quit, just type in \"quit\". You can always resume the tutorial later by simply restarting it and introducing yourself again.
To continue, just press enter."""
if raw_input(">>> ") == "quit":
quit()
print """So, the beginning. What is computer programming? In most cases, it is writing your computer what you want it to do, and that is what we will be doing.
-Fox example, you could tell your computer to make some calculations for you. Whenever you see ">>> " on the screen, that means that you can type. *(explain this differently)*
+Fox example, you could tell your computer to make some calculations for you. Whenever you see ">>> " on the screen, that means that you can type. *(TODO: explain this differently)?*
Try typing "print 10 + 3". """
exactly = True
while True:
@@ -42,13 +43,13 @@ Try typing "print 10 + 3". """
except:
print "That won't work. Try what I suggested."
else:
- print "You don't have to type exactly the numbers I asked you to, but you should start with \"print \"."
+ print "You don't have to use the numbers I asked you to, but you should start with \"print \"."
print
print "Press enter to continue."
user_input = raw_input(">>> ")
print "Good.",
if exactly == False:
- print "That wasn't exactly what I asked you to type, but it works as well.",
+ print "That wasn't exactly what I asked you to type, but it works as well. It's good that you're trying your own examples!",
print """Please - try some more! You can use any numbers and other mathematical operations (+, -, *, /, **, % ) as well. A few examples: "print 5 * 5", "print 30 / 3", "print 1 + 2 + 3 + 4 - 5". When you are done trying your calculations, simply type "done" and I will continue."""
user_input = raw_input(">>> ")
while user_input != "done":
@@ -79,7 +80,7 @@ print b / a
Think about it, then run it to see if you got it right, and I'll be waiting with the next chapter!
Type "done" when you are finished."""
- # TODO: This could could/should go into a function.
+ # TODO: This could/should go into a function.
user_input = raw_input(">>> ")
while user_input != "done":
if user_input == "quit":