getting-started-ipython/questions.rst
author Nishanth <nishanth@fossee.in>
Mon, 11 Oct 2010 23:36:15 +0530
changeset 303 56dc2183f1de
parent 269 5a3c06e9b89a
child 384 525ae0d74e47
permissions -rw-r--r--
Merged

Objective Questions
-------------------

.. A mininum of 8 questions here (along with answers)

1. ``ipython`` is a programming language similar to Python. T or F?

   Answer: False

#. Which key combination quits ``ipython``?

  a. Ctrl + C
  #. Ctrl + D
  #. Alt + C
  #. Alt + D

  Answer: Ctrl + D

#. Which key combination raises a ``keyboard interrupt``

  a. Ctrl + C
  #. Ctrl + D
  #. Alt + C
  #. Alt + D

  Answer: Ctrl + C

#. If you have typed the following commands::

     1 + 2
     3 - 5
     1 - 6
     5 + 5
     3 * 2

   What is the result of the following actions.

   * up arrow 3 times
   * backspace 4 times

   Answer: 1

#. If you have typed the following commands::

     1 + 2
     3 - 5
     1 - 6
     5 + 5
     3 * 2

   What is the result of the following actions.

   * type ``1``
   * up arrow 2 times

   Answer: 1 + 2

#. If you have typed the following commands::

     1 + 2
     3 - 5
     1 - 6
     5 + 5
     3 * 2

   What is the result of the following actions.

   * type ``5``
   * up arrow 2 times

   Answer: 5 + 5

#. If you have typed the following commands::

     1 + 2
     3 - 5
     1 - 6
     5 + 5
     3 * 2

   What is the result of the following actions.

   * type ``1``
   * up arrow 1 time
   * left arrow 3 times
   * up arrow key

   Answer: 1 - 6

#. If you have typed the following commands::

     1 + 2
     3 - 5
     1 - 6
     5 + 5
     3 * 2

   What is the result of the following actions.

   * type ``1``
   * up arrow 1 time
   * left arrow 3 times
   * down arrow key

   Answer: 1 - 6

#. If the following are only commands available in ``ipython``

   * zebra
   * zenith
   * zest

   What are the commands listed by typing ``z`` and hitting the <TAB> key

   Answer: zebra, zenith, zest

#. If the following are only commands available in ``ipython``

   * zebra
   * zenith
   * zest

   ``z`` is auto-completed to ``ze`` by hitting the <TAB> key after typing
   ``z``. T or F?

   Answer: True


#. If the following are only commands available in ``ipython``

   * zebra
   * zenith
   * zest

   What are the commands listed by typing ``zeb`` and hitting the <TAB> key

   Answer: zebra

#. If the following are only commands available in ``ipython``

   * zebra
   * zenith
   * zest

   What are the commands listed by typing ``z`` and hitting the <TAB> key

   Answer: zebra, zenith, zest

#. Which character is used at the end of a command, in ``ipython`` to display
   the documentation.
   
   a. _
   #. ?
   #. !
   #. &

   Answer: ?

#. What happens if the size of documentation text is more than that can be
   accomodated on your screen.
   
   a. The whole documentation is printed and it is auto scrolled to bottom
   #. Only a part of documentation is shown and the remaining can be scrolled 
      through using up and down arrows
   #. Only a part of documentation is shown and cursor returns to ``In`` prompt

   Answer: Only a part of documentation is shown and the remaining can be 
           scrolled through using up and down arrows

#. Which key is used to quit the documentation that runs several pages and
   return to the ``ipython`` prompt.

   a. a
   #. c
   #. q
   #. <ESC>

   Answer: q

Larger Questions
----------------

.. A minimum of 2 questions here (along with answers)

1. Question 1
2. Question 2