.. This file is part of the OpenDSA eTextbook project. See
.. http://opendsa.org for more details.
.. Copyright (c) 2012-2020 by the OpenDSA Project Contributors, and
.. distributed under an MIT open source license.

.. avmetadata::
   :author: Hamza Manzoor
   :requires:
   :satisfies: Python Basics
   :topic: Parsons Python


jsParsons Python 5
==================

About
-----------------------

Parson's problems in Python.

ps_python_comparisons
---------------------
Construct a program that prints out whether variable a is bigger than b.

.. extrtoolembed:: 'ps_python_comparisons'
   :learning_tool: mastery-grid-jsparsons-python

ps_python_add_to_list
---------------------
Construct a function that adds a given amount to all items in a list.

.. extrtoolembed:: 'ps_python_add_to_list'
   :learning_tool: mastery-grid-jsparsons-python

ps_python_swap
--------------
Construct a program that swaps the values of x and y variables.

.. extrtoolembed:: 'ps_python_swap'
   :learning_tool: mastery-grid-jsparsons-python

ps_python_xor
-------------
Construct a program that mimics an XOR gate (exclu- sive or). When input_a and input_b are the same, it should print out 0 and in other cases print out 1.

.. extrtoolembed:: 'ps_python_xor'
   :learning_tool: mastery-grid-jsparsons-python

ps_python_for_odd_or_even
-------------------------
Construct a program that goes through a list of numbers and prints out whether they are odd or even.

.. extrtoolembed:: 'ps_python_for_odd_or_even'
   :learning_tool: mastery-grid-jsparsons-python

ps_python_string_join
---------------------
Construct a program that prints out a sentence from a given list of words by joining words in a list.

.. extrtoolembed:: 'ps_python_string_join'
   :learning_tool: mastery-grid-jsparsons-python


