summaryrefslogtreecommitdiff
path: root/lecture_notes/advanced_python/exercises.rst
diff options
context:
space:
mode:
authorhardythe12014-06-12 14:44:39 +0530
committerhardythe12014-06-12 14:44:39 +0530
commitf4ff073c0e144546d7c205f6c99df6baed763b04 (patch)
tree3c6163a3d3aa22362ab9009ece2019e60fc267a6 /lecture_notes/advanced_python/exercises.rst
parent2a0aa076b9879a71dba6235ef84efa9cd15fda80 (diff)
downloadsees-f4ff073c0e144546d7c205f6c99df6baed763b04.tar.gz
sees-f4ff073c0e144546d7c205f6c99df6baed763b04.tar.bz2
sees-f4ff073c0e144546d7c205f6c99df6baed763b04.zip
restructuring and renaming files/directories with underscores instead of spaces & '-'
Diffstat (limited to 'lecture_notes/advanced_python/exercises.rst')
-rw-r--r--lecture_notes/advanced_python/exercises.rst56
1 files changed, 56 insertions, 0 deletions
diff --git a/lecture_notes/advanced_python/exercises.rst b/lecture_notes/advanced_python/exercises.rst
new file mode 100644
index 0000000..eeaa323
--- /dev/null
+++ b/lecture_notes/advanced_python/exercises.rst
@@ -0,0 +1,56 @@
+Exercises
+=========
+
+#. Consider the iteration :math:`$x_{n+1} = f(x_n)$` where
+ :math:`$f(x) = kx(1-x)$`. Plot the successive iterates of this
+ process.
+
+#. Plot this using a cobweb plot as follows:
+
+ #. Start at :math:`$(x_0, 0)$`
+ #. Draw line to :math:`$(x_i, f(x_i))$`;
+ #. Set :math:`$x_{i+1} = f(x_i)$`
+ #. Draw line to :math:`$(x_i, x_i)$`
+ #. Repeat from 2 for as long as you want
+
+#. Plot the Koch snowflake. Write a function to generate the necessary
+ points given the two points constituting a line.
+
+ #. Split the line into 4 segments.
+ #. The first and last segments are trivial.
+ #. To rotate the point you can use complex numbers, recall that
+ :math:`$z e^{j \theta}$` rotates a point :math:`$z$` in 2D by
+ :math:`$\theta$`.
+ #. Do this for all line segments till everything is done.
+
+#. Show rate of convergence for a first and second order finite
+ difference of sin(x)
+
+#. Given, the position of a projectile in in ``pos.txt``, plot it's
+ trajectory.
+
+ - Label both the axes.
+ - What kind of motion is this?
+ - Title the graph accordingly.
+ - Annotate the position where vertical velocity is zero.
+
+#. Write a Program that plots a regular n-gon(Let n = 5).
+
+#. Create a sequence of images in which the damped oscillator
+ (:math:`$e^{-x/10}sin(x)$`) slowly evolves over time.
+
+#. Given a list of numbers, find all the indices at which 1 is present.
+ numbers = [1, 1, 3, 4, 3, 6, 7, 8, 1, 2, 4, 1]
+
+#. Given a list of numbers, find all the indices at which 1 is present.
+ numbers = [1, 1, 3, 4, 3, 6, 7, 8, 1, 2, 4, 1]. Solve the problem using a
+ functional approach.
+
+..
+ Local Variables:
+ mode: rst
+ indent-tabs-mode: nil
+ sentence-end-double-space: nil
+ fill-column: 77
+ End:
+