Python programming exercises, I
Grid Computing Competence Center
Python programming exercises, I
Riccardo Murri Grid Computing Competence Center, Organisch-Chemisches Institut, University of Zurich
Nov. 10, 2011
Today's class
Getting your feet wet with Python programming. (Review of yesterday's stuff.) These slides are available for download from:
Python II
R. Murri, Large Scale Computing Infrastructures, Nov. 10, 2011
Yesterday's homework
Write a function sp(C,L) that returns a pair (tuple) of elements from a list L whose sum is integer C. (Unspecified: what should it do when no pairs of values from L sums to C?)
Python II
R. Murri, Large Scale Computing Infrastructures, Nov. 10, 2011
Testing solutions
Rather than inspecting each solutions' code, we shall write a test class, using Python standard library unit testing facility. Your solution is correct if it passes the test.
Python II
R. Murri, Large Scale Computing Infrastructures, Nov. 10, 2011
Python's unittest module
Python's unittest requires one to define a subclass of unittest.TestCase. All methods whose name starts with test are executed; if none errors out, the test is passed. Test methods should use methods assertEqual, assertTrue, etc. defined by class TestCase to check if test conditions are satisfied. Reference:
Python II
R. Murri, Large Scale Computing Infrastructures, Nov. 10, 2011
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- cpython internals your guide to the python 3 interpreter
- python notes university of chicago
- about the tutorial rxjs ggplot2 python data
- python 3 tutorialspoint
- python 3 cheat sheet
- python programming exercises i
- think python 2e depaul university
- basic python programming for loops and reading files
- c 1 what s new in dive into python 3
- c h a p r 2 file handling in python
Related searches
- java programming exercises beginner
- python programming books free pdf
- best python programming book
- python programming language pdf book
- free python programming books
- python programming pdf free download
- python programming tutorials
- python programming for absolute beginners
- python programming on win32 download
- basic python programming examples
- python programming examples pdf
- python programming examples source code