Close
Register
Close Window

Demo Exercises from Pitt-Acos

Chapter 2 Python Parsons Problems

Show Source |    | About   «  2.5. jsParsons Python 5   ::   Contents

2.6. jsParsons Python 6

2.6.1. About

Parson's problems in Python.

2.6.2. ps_python_try_adding

Construct a function that adds two numbers together and handles non-numeric input through exception handling.

2.6.3. ps_python_class_point

Construct a class Point which has a method to calculate distance from another instance of Point.

2.6.4. ps_python_2d_list

Construct a program that prints out [[0, 1, 2], [3, 4, 5], [6, 7, 99]] from the given equation.

2.6.5. ps_python_nested_loops

Construct a program that first prints out 15, then 14, then 12, then 9 and finally 5 on consecutive lines using nested loops.

   «  2.5. jsParsons Python 5   ::   Contents

nsf
Close Window