merging changes
authoramit
Thu, 23 Sep 2010 16:49:48 +0530
changeset 209 4c2ee1036652
parent 208 0f78508a4478 (current diff)
parent 207 2f30ecfd6007 (diff)
child 211 8bc4f7b3e038
merging changes
--- a/getting_started_with_for.rst	Thu Sep 23 16:47:08 2010 +0530
+++ b/getting_started_with_for.rst	Thu Sep 23 16:49:48 2010 +0530
@@ -18,8 +18,8 @@
 
 {{{ switch to next slide, outline slide }}}
 
-In this tutorial we will learn about ``for`` loops in python, and also cover
-the basics of indenting code in python.
+In this tutorial we will learn about ``for`` loops in python, and also
+learn how to write blocks of code in Python.
 
 .. #[Nishanth]: Instead of saying basics of indenting code,
                 say How to define code blocks in Python
@@ -27,11 +27,7 @@
 {{{ switch to next slide, about whitespaces }}}
 
 In Python whitespace is significant, and the blocks are visually
-separated rather than using braces or any other mechanisms for
-defining blocks. And by this method Python forces the programmers to
-stick on to one way of writing or beautifying the code rather than
-debating over where to place the braces. This way it produces uniform
-code than obscure or unreadable code.
+separated.
 
 .. #[nishanth]: Simply tell how blocks are defined in python.
                 The details like braces are not used and its
@@ -41,9 +37,7 @@
 .. #[Amit]: Do you want to do that here. May be its better to talk about 
    this after some initiation into the idea of blocks. 
 
-A block may be defined by a suitable indentation level which can be
-either be a tab or few spaces. And the best practice is to indent the
-code using four spaces.
+The best practice is to indent the code using four spaces.
 
 .. #[Nishanth]: Even this detail may be skipped. Simply say use 4 spaces
                 for indentation. Do that while typing so that they can
@@ -53,15 +47,15 @@
 
 {{{ switch to next slide, problem statement of exercise 1 }}}
 
+
 Write a for loop which iterates through a list of numbers and find the
-square root of each number. Also make a new list with the square roots
-and print it at the end.
+square root of each number.
+::
+
+    numbers are 1369, 7225, 3364, 7056, 5625, 729, 7056, 576, 2916
 
 .. #[nishanth]: making new list with square roots induces extra complication
                 like appending which has no use case here
-::
-
-    numbers are 1369, 7225, 3364, 7056, 5625, 729, 7056, 576, 2916
 
 .. #[Nishanth]: The problem focuses more on square root and creation
                 of list. The problem must be simple and focusing on 
@@ -79,13 +73,9 @@
 ::
 
     numbers = [1369, 7225, 3364, 7056, 5625, 729, 7056, 576, 2916]
-    square_roots = []
     for each in numbers:
-        sq_root = sqrt(each)
-        print "Square root of", each, "is", sq_root
-        square_roots.append(sq_root)
-    print 
-    print square_roots
+        print "Square root of", each, "is", sqrt(each)
+    print "This is not in for loop!"
 
 ..  numbers = [1, 12, 3, 4, 21, 17]
     for each in numbers:
@@ -110,14 +100,12 @@
 
 {{{ run the script }}}
 
-So that was easy! We didn't have to find the length of the string nor
-address of each element of the list one by one. All what we did was
-iterate over the list element by element and then use the element for
-calculation. Note that here we used three variables. One the variable
-``numbers``, which is a list, another one ``each``, which is the
-element of list under consideration in each cycle of the ``for`` loop,
-and then a variable ``sq_root`` for storing the square root in each
-cycle of the ``for`` loop. The variable names can be chosen by you.
+So that was easy! All what we did was iterate over the list element by
+element and then use the element for calculation. Note that here we
+used two variables. One the variable ``numbers``, which is a list,
+another one ``each``, which is the element of list under consideration
+in each cycle of the ``for`` loop. The variable names can be chosen by
+you.
 
 .. #[Nishanth]: The details like we didn't have to find the length
                 are relevant for people who have programmed in C or
@@ -131,16 +119,16 @@
 
 {{{ show the script which was created }}}
 
-Note that three lines after ``for`` statement, are indented using four
+Note that the lines after ``for`` statement, is indented using four
 spaces.
 
-{{{ highlight the three lines after for statement }}}
+{{{ highlight the line after for statement }}}
 
-It means that those three lines are part of the for loop. And it is
-called a block of statements. And the seventh line or the immediate
-line after the third line in the ``for`` loop is not indented, 
+It means that line is part of the for loop. And it is a block of code,
+although it is only a single statement in the block. And the fourth
+line or the immediate line after the ``for`` block is not indented,
 
-{{{ highlight the seventh line - the line just after for loop }}}
+{{{ highlight the fourth line - the line just after for loop }}}
 
 it means that it is not part of the ``for`` loop and the lines after
 that doesn't fall in the scope of the ``for`` loop. Thus each block is
@@ -157,7 +145,7 @@
     7225, 3268, 3364, 2966, 7056, 5625, 729, 5547, 7056, 576, 2916
 
 {{{ switch to next slide, problem statement of second problem in
-solved exercie}}}
+solved exercise}}}
 
 Now let us try a simple one, to print the square root of numbers in
 the list. And this time let us do it right in the IPython
@@ -174,15 +162,15 @@
 and now you will notice that, as soon as you press the return key
 after for statement, the prompt changes to four dots and the cursor is
 not right after the four dots but there are four spaces from the
-dots. The four dots tell you that you are inside a block. Now type the
-rest of the ``for`` loop,
+dots. Please note that IPython automatically indents the block. The
+four dots tell you that you are inside a block. Now type the rest of
+the ``for`` loop,
 
 .. #[Nishanth]: Tell that IPython does auto indentation.
 
 ::
 
-        sq_root = sqrt(each)
-        print "Square root of", each, "is", sq_root
+        print "Square root of", each, "is", sqrt(each)
 
 Now we have finished the statements in the block, and still the
 interpreter is showing four dots, which means you are still inside the
@@ -190,9 +178,8 @@
 without entering anything else. It printed the square root of each
 number in the list, and that is executed in a ``for`` loop.
 
-Now, let us generate the multiplication table of 10 from one to
-ten. But this time let us try it in the vanilla version of Python
-interpreter.
+Now, let us find the cube of all the numbers from one to ten. But this
+time let us try it in the vanilla version of Python interpreter.
 
 Start the vanilla version of Python interpreter by issuing the command
 ``python`` in your terminal.
@@ -207,11 +194,12 @@
 
 and press enter once, and we will see that this time it shows four
 dots, but the cursor is close to the dots, so we have to indent the
-block. So enter four spaces there and then type the following
+block. The vanilla version of Python interpreter does not indent the
+code automatically. So enter four spaces there and then type the
+following
 ::
     
-    
-        print "10 x",i,"=",i*10
+        print i, "cube is", i**3
 
 Now when we hit enter, we still see the four dots, to get out of the
 block, hit enter once again
@@ -231,8 +219,8 @@
 were generating the multiplication table we used something new,
 ``range()`` function. ``range()`` is an inbuilt function in Python
 which can be used to generate a ``list`` of integers from a starting
-number to an ending number. Note that the ending number that you specify
-will not be included in the ``list``.
+number to an ending number. Note that the ending number that you
+specify will not be included in the ``list``.
 
 .. #[Nishanth]: Show some examples of range without the step argument
                 May be give an exercise with negative numbers as arguments
@@ -240,15 +228,14 @@
 Now, let us print all the odd numbers from 1 to 50. Let us do it in
 our IPython interpreter for ease of use.
 
-{{{ switch focus to ipython interpreter }}}
-
 {{{ switch to next slide, problem statement of the next problem in
 solved exercises }}}
 
-Print the list of odd numbers from 1 to 50. It will be better if
-you can try it out yourself.
+{{{ switch focus to ipython interpreter }}}
 
-It is a very trivial problem and can be solved as,
+The problem can be solved by just using the ``range()`` function.
+
+It can be solved as,
 ::
 
     print range(1,51,2)
--- a/multiple-plots.rst	Thu Sep 23 16:47:08 2010 +0530
+++ b/multiple-plots.rst	Thu Sep 23 16:49:48 2010 +0530
@@ -10,6 +10,7 @@
 plots with different regular axes which are also called as subplots.
 
 .. #[Nishanth]: See diff - edited a grammatical mistake
+.. #[Madhu: Done]
 
 {{{ Shift to terminal and start ipython -pylab }}}
 
@@ -31,6 +32,8 @@
                 covers linspace and plot. So you may not need to 
                 specify all that again. But not a problem if it is
                 there also.
+.. #[Madhu: Since I thought the LOs are disconnected, I thought it is
+     better to give a very short intro to it]
 
 Now let us draw a plot simple sine plot using these points::
 
@@ -45,18 +48,23 @@
 really caused this?
 
 .. #[Nishanth]: See diff
+.. #[Madhu: Done]
 
 {{{ pause for a while }}}
 
 A small investigation on linspace tells us that we chose too few
 points in a large interval between 0 and 50 for the curve to be
-smooth. So now let us use linspace again to get 500 points between 0
-and 100 and draw the sine plot
+smooth. This should also indicate that the plot command actually plots
+the set of points given by x and sin(x) and it doesn't plot the
+analytical function itself i.e. it plots the points given by
+Analytical functions. So now let us use linspace again to get 500
+points between 0 and 100 and draw the sine plot
 
 .. #[Nishanth]: Here specify that when we do plot(x, sin(x) 
                 it is actually plotting two sets of points
                 and not analytical functions. Hence the sharp 
                 curve.
+.. #[Madhu: Incorporated]
 
 {{{ Switch to ipython andtype }}} ::
 
@@ -69,10 +77,59 @@
 carefully notice we also have two plots now one overlaid upon
 another. In pylab, by default all the plots are overlaid.
 
-We now know how to draw multiple plots but we would like to have more
-control over it. Like switch between them, perform some operations or
-labelling on them individually and so on. Let us see how to accomplish
-this. Before we move on, let us clear our screen.
+Since we have two plots now overlaid upon each other we would like to
+have a way to indicate what each plot represents to distinguish
+between them. This is accomplished using legends. Equivalently, the
+legend command does this for us
+
+{{{ Switch to ipython }}}::
+
+  legend(['sin(x)', 'cos(x)'])
+
+.. #[Nishanth]: This legend may go up in the script. May be before 
+                introducing the figure command itself.
+.. #[Madhu: brought up]
+
+The legend command takes a single list of parameters where each
+parameter is the text indicating the plots in the order of their
+serial number.
+
+{{{ Switch to plot window }}}
+
+Now we can see the legends being displayed for the respective sine and
+cosine plots on the plot area.
+
+We have learnt quite a lot of things now, so let us take up an
+exercise problem.
+
+%% 1 %% Draw two plots overlaid upon each other, with the first plot
+   being a parabola of the form y = 4(x ^ 2) and the second being a
+   straight line of the form y = 2x + 3 in the interval -5 to 5. Use
+   colors to differentiate between the plots and use legends to
+   indicate what each plot is doing.
+
+{{{ pause for a while and continue from paused state }}}
+
+We can obtain the two plots in different colors using the following
+commands::
+
+  x = linspace(-5, 5, 100)
+  plot(x, 4 * (x ^ 2), 'b')
+  plot(x, (2 * x) + 3, 'g')
+
+Now we can use the legend command as::
+
+  legend(['Parabola', 'Straight Line'])
+
+Or we can also just give the equations of the plot::
+
+  legend(['y = 4(x ^ 2)', 'y = 2x + 3'])
+
+We now know how to draw multiple plots and use legends to indicate
+which plot represents what function, but we would like to have more
+control over the plots we draw. Like switch between them, perform some
+operations or labelling on them individually and so on. Let us see how
+to accomplish this. Before we move on, let us clear our screen.
 
 {{{ Switch to ipython }}}::
 
@@ -100,6 +157,11 @@
                 and finish off the everything on legend.
                 Then introduce figure command.
 
+.. #[Madhu: I have just moved up the text about legend command. I
+     think that should take care of what you suggested. If there is
+     some mistake with it, Punch please let me know in your next
+     review.]
+
 {{{ Have both plot window and ipython side by side }}}
 
 The figure command takes an integer as an argument which is the serial
@@ -120,26 +182,44 @@
 We also titled the our first plot as 'sin(y)' which we did not do for
 the second plot.
 
-Since we have two plots now overlaid upon each other we would like to
-have a way to indicate what each plot represents to distinguish
-between them. This is accomplished using legends. Equivalently, the
-legend command does this for us
+Let us attempt another exercise problem
+
+%% 2 %% Draw a line of the form y = x as one figure and another line
+   of the form y = 2x + 3. Switch back to the first figure, annotate
+   the x and y intercepts. Now switch to the second figure and
+   annotate its x and y intercepts. Save each of them.
+
+{{{ Pause for a while and continue from the paused state }}}
 
-{{{ Switch to ipython }}}::
+To solve this problem we should first create the first figure using
+the figure command. Before that, let us first run clf command to make
+sure all the previous plots are cleared::
 
-  legend(['sin(x)', 'cos(x)'])
+  clf()
+  figure(1)
+  x = linspace(-5, 5, 100)
+  plot(x, x)
 
-.. #[Nishanth]: This legend may go up in the script. May be before 
-                introducing the figure command itself.
+Now we can use figure command to create second plotting area and plot
+the figure::
+
+  figure(2)
+  plot(x, ((2 * x) + 3))
 
-The legend command takes a single list of parameters where each
-parameter is the text indicating the plots in the order of their
-serial number.
+Now to switch between the figures we can use figure command. So let us
+switch to figure 1. We are asked to annotate x and y intercepts of the
+figure 1 but since figure 1 passes through origin we will have to
+annotate the origin. We will annotate the intercepts for the second
+figure and save them as follows::
 
-{{{ Switch to plot window }}}
-
-Now we can see the legends being displayed for the respective sine and
-cosine plots on the plot area.
+  figure(1)
+  annotate('Origin', xy=(0.0, 0.0)
+  figure(2)
+  annotate('x-intercept', xy=(0, 3))
+  annotate('y-intercept', xy=(0, -1.5))
+  savefig('plot2.png')
+  figure(1)
+  savefig('plot1.png')
 
 At times we run into situations where we want to compare two plots and
 in such cases we want to draw both the plots in the same plotting
@@ -197,7 +277,56 @@
 100 and y-axis varies from 0 to 1 where as for the parabolic plot the
 x-axis varies from 0 to 10 and y-axis varies from 0 to 100
 
-.. #[Nishanth]: stress on the similarity between subplot and figure commands
+.. #[Nishanth]: stress on the similarity between subplot and figure
+     commands
+
+.. #[Madhu: I think they are not really similar. Trying to bring in
+     the similarity will confuse people I think.]
+
+%% 3 %% We know that the Pressure, Volume and Temperatures are held by
+the equation PV = nRT where nR is a constant. Let us assume nR = .01
+Joules/Kelvin and T = 200K. V can be in the range from 21cc to
+100cc. Draw two different plots as subplots, one being the Pressure
+versus Volume plot and the other being Pressure versus Temparature
+plot.
+
+{{{ Pause for a while and continue }}}
+
+To start with, we have been given the range of Volume using which we
+can define the variable V::
+
+  V = linspace(21, 100, 500)
+
+Now we can create first subplot and draw Pressure versus Volume graph
+using this V. We know that nRT is a constant which is equal to 2.0
+since nR = 0.01 Joules/Kelvin and T = 200 Kelvin::
+
+  subplot(2, 1, 1)
+  plot(V, 2.0/V)
+
+Now we can create the second subplot and draw the Pressure versus
+Temparature plot as follows::
+
+  subplot(2, 1, 2)
+  plot(200, 2.0/V)
+
+Unfortunately we have an error now, telling x and y dimensions don't
+match. This is because our V contains a set of values as returned by
+linspace and hence 2.0/V which is the pressure also contains a set of
+values. But the first argument to the plot command is a single
+value. So to plot this data we need to create as many points as there
+are in Pressure or Volume data for Temperature too, all having the
+same value. This can be accomplished using::
+
+  T = linspace(200, 200, 500)
+
+We now have 500 values in T each with the value 200 Kelvin. Plotting
+this data we get the required plot::
+
+  plot(T, 2.0/V)
+
+It is left as a homework to label both X and Y axes for each of the
+two subplots. 
 
 {{{ Show summary slide }}}
 
@@ -211,12 +340,13 @@
 
  * How to draw multiple plots which are overlaid
  * the figure command
+ * the legend command
  * how to switch between the plots and perform some operations on each
-   of them like saving the plots
- * the legend command and
+   of them like saving the plots and
  * creating and switching between subplots
 
 .. #[Nishanth]: legend command can be told right after overlaid plots
+.. #[Madhu: Incorporated]
 
 {{{ Show the "sponsored by FOSSEE" slide }}}
 
--- a/symbolics.rst	Thu Sep 23 16:47:08 2010 +0530
+++ b/symbolics.rst	Thu Sep 23 16:49:48 2010 +0530
@@ -4,11 +4,19 @@
 This tutorial on using Sage for symbolic calculation is brought to you
 by Fossee group.
 
+.. #[Madhu: Sounds more or less like an ad!]
+
 {{{ Part of Notebook with title }}}
 
+.. #[Madhu: Please make your instructions, instructional. While
+     recording if I have to read this, think what you are actually
+     meaning it will take a lot of time]
+
 We would be using simple mathematical functions on the sage notebook
 for this tutorial.
 
+.. #[Madhu: What is this line doing here. I don't see much use of it]
+
 During the course of the tutorial we will learn
 
 {{{ Part of Notebook with outline }}}
@@ -21,16 +29,27 @@
 .. #[Nishanth]: The formatting is all messed up
                 First fix the formatting and compile the rst
                 The I shall review
+.. #[Madhu: Please make the above items full english sentences, not
+     the slides like points. The person recording should be able to
+     read your script as is. It can read something like "we will learn
+     how to define symbolic expressions in Sage, using built-in ..."]
 
-Using sage we can perform mathematical operations on symbols .
+Using sage we can perform mathematical operations on symbols.
+
+.. #[Madhu: Same mistake with period symbols! Please get the
+     punctuation right. Also you may have to rephrase the above
+     sentence as "We can use Sage to perform sybmolic mathematical
+     operations" or such]
 
 On the sage notebook type::
    
     sin(y)
 
-It raises a name error saying that y is not defined . But in sage we
-can declare y as a symbol using var function. ::
-   
+It raises a name error saying that y is not defined. But in sage we
+can declare y as a symbol using var function.
+
+.. #[Madhu: But is not required]
+::
     var('y')
    
 Now if you type::
@@ -39,17 +58,30 @@
 
      sage simply returns the expression .
 
+.. #[Madhu: Why is this line indented? Also full stop. When will you
+     learn? Yes we can correct you. But corrections are for you to
+     learn. If you don't learn from your mistakes, I don't know what
+     to say]
+
 thus now sage treats sin(y) as a symbolic expression . You can use
 this to do a lot of symbolic maths using sage's built-in constants and
 expressions .
 
-Try out ::
+.. #[Madhu: "Thus now"? It sounds like Dus and Nou, i.e 10 and 9 in
+     Hindi! Full stop again. "a lot" doesn't mean anything until you
+     quantify it or give examples.]
+
+Try out
+
+.. #[Madhu: "So let us try" sounds better]
+ ::
    
    var('x,alpha,y,beta') x^2/alpha^2+y^2/beta^2
  
 Similarly , we can define many algebraic and trigonometric expressions
 using sage .
 
+.. #[Madhu: comma again. Show some more examples?]
 
 
 Sage also provides a few built-in constants which are commonly used in
@@ -58,6 +90,11 @@
 example : pi,e,oo , Function n gives the numerical values of all these
     constants.
 
+.. #[Madhu: This doesn't sound like scripts. How will I read this
+     while recording. Also if I were recording I would have read your
+     third constant as Oh-Oh i.e. double O. It took me at least 30
+     seconds to figure out it is infinity]
+
 For instance::
 
    n(e)
@@ -66,22 +103,33 @@
 
 gives numerical value of e.
 
-If you look into the documentation of n by doing ::
+If you look into the documentation of n by doing
 
+.. #[Madhu: "documentation of the function "n"?]
+
+::
    n(<Tab>
 
 You will see what all arguments it can take etc .. It will be very
 helpful if you look at the documentation of all functions introduced
-      
+
+.. #[Madhu: What does etc .. mean in a script?]
 
 Also we can define the no of digits we wish to use in the numerical
-value . For this we have to pass an argument digits.  Type::
-  
+value . For this we have to pass an argument digits.  Type
+
+.. #[Madhu: "no of digits"? Also "We wish to obtain" than "we wish to
+     use"?]
+::
+
    n(pi, digits = 10)
 
 Apart from the constants sage also has a lot of builtin functions like
 sin,cos,sinh,cosh,log,factorial,gamma,exp,arcsin,arccos,arctan etc ...
-lets try some out on the sage notebook. ::
+lets try some out on the sage notebook.
+
+.. #[Madhu: Here "a lot" makes sense]
+::
      
    sin(pi/2)
    
@@ -96,6 +144,10 @@
        var('x') function(<tab> {{{ Just to show the documentation
        extend this line }}} function('f',x)
 
+.. #[Madhu: What will the person recording show in the documentation
+     without a script for it? Please don't assume recorder can cook up
+     things while recording. It is impractical]
+
 Here f is the name of the function and x is the independent variable .
 Now we can define f(x) to be ::
 
@@ -105,10 +157,14 @@
 	   
 	   f(pi)
 
-We can also define function that are not continuous but defined
+We can also define functions that are not continuous but defined
 piecewise.  We will be using a function which is a parabola between 0
 to 1 and a constant from 1 to 2 .  type the following as given on the
-screen::
+screen
+
+.. #[Madhu: Instead of "We will be using ..." how about "Let us define
+     a function ..."]
+::
       
 
       var('x') h(x)=x^2 g(x)=1 f=Piecewise(<Tab> {{{ Just to show the
@@ -117,21 +173,27 @@
 
 Checking f at 0.4, 1.4 and 3 :: f(0.4) f(1.4) f(3)
 
+.. #[Madhu: Again this doesn't sound like a script]
+
 for f(3) it raises a value not defined in domain error .
 
 
 Apart from operations on expressions and functions one can also use
 them for series .
 
+.. #[Madhu: I am not able to understand this line. "Use them as
+.. series". Use what as series?]
+
 We first define a function f(n) in the way discussed above.::
 
    var('n') function('f', n)
 
+.. #[Madhu: Shouldn't this be on 2 separate lines?]
 
 To sum the function for a range of discrete values of n, we use the
 sage function sum.
 
- For a convergent series , f(n)=1/n^2 we can say ::
+For a convergent series , f(n)=1/n^2 we can say ::
    
    var('n') function('f', n)
 
@@ -141,11 +203,18 @@
 
 For the famous Madhava series :: var('n') function('f', n)
 
+.. #[Madhu: What is this? your double colon says it must be code block
+     but where is the indentation and other things. How will the
+     recorder know about it?]
+
     f(n) = (-1)^(n-1)*1/(2*n - 1)
 
 This series converges to pi/4. It was used by ancient Indians to
 interpret pi.
 
+.. #[Madhu: I am losing the context. Please add something to bring
+     this thing to the context]
+
 For a divergent series, sum would raise a an error 'Sum is
 divergent' :: 
 	
@@ -158,6 +227,10 @@
 
 We can perform simple calculus operation using sage
 
+.. #[Madhu: When you switch to irrelevant topics make sure you use
+    some connectors in English like "Moving on let us see how to
+    perform simple calculus operations using Sage" or something like
+    that]
 For example lets try an expression first ::
 
     diff(x**2+sin(x),x) 2x+cos(x)
@@ -166,6 +239,8 @@
 first argument is expression or function and second argument is the
 independent variable .
 
+.. #[Madhu: Full stop, Full stop, Full stop]
+
 We have already tried an expression now lets try a function ::
 
    f=exp(x^2)+arcsin(x) diff(f(x),x)
@@ -175,6 +250,7 @@
  
    diff(<tab> diff(f(x),x,3)
 
+.. #[Madhu: Please try to be more explicit saying third argument]
 
 in this case it is 3.
 
@@ -183,10 +259,13 @@
 
      x = var('x') s = integral(1/(1 + (tan(x))**2),x) s
 
+.. #[Madhu: Two separate lines.]
 
+To find the factors of an expression use the "factor" function
 
-To find factors of an expression use the function factor
+.. #[Madhu: See the diff]
 
+::
     factor(<tab> y = (x^100 - x^70)*(cos(x)^2 + cos(x)^2*tan(x)^2) f =
     factor(y)
 
@@ -198,20 +277,25 @@
 
     f.simplify_exp() f.simplify_trig()
     
+.. #[Madhu: Separate lines?]
 
 One can also find roots of an equation by using find_root function::
 
     phi = var('phi') find_root(cos(phi)==sin(phi),0,pi/2)
 
+.. #[Madhu: Separate lines?]
+
 Lets substitute this solution into the equation and see we were
 correct ::
 
      var('phi') f(phi)=cos(phi)-sin(phi)
      root=find_root(f(phi)==0,0,pi/2) f.substitute(phi=root)
 
+.. #[Madhu: Separate lines?]
 
 as we can see the solution is almost equal to zero .
 
+.. #[Madhu: So what?]
 
 We can also define symbolic matrices ::
 
@@ -219,11 +303,16 @@
 
    var('a,b,c,d') A=matrix([[a,1,0],[0,b,0],[0,c,d]]) A
 
+.. #[Madhu: Why don't you break the lines?]
 
-Now lets do some of the matrix operations on this matrix ::
+Now lets do some of the matrix operations on this matrix
 
+.. #[Madhu: Why don't you break the lines? Also how do you connect
+     this up? Use some transformation keywords in English]
+::
+    A.det() A.inverse()
 
-    A.det() A.inverse()
+.. #[Madhu: Why don't you break the lines?]
 
 You can do ::
     
@@ -231,6 +320,7 @@
 
 To see what all operations are available
 
+.. #[Madhu: Sounds very abrupt]
 
 {{{ Part of the notebook with summary }}}
 
@@ -247,3 +337,7 @@
 factor() , simplify_full, simplify_exp , simplify_trig .
 Substituting values in expression using substitute function.
 And finally creating symbolic matrices and performing operation on them .
+
+.. #[Madhu: See what Nishanth is doing. He has written this as
+     points. So easy to read out while recording. You may want to
+     reorganize like that]