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
- python programming exercises i
- learning outcomes cbse
- preeti arora
- invent your own computer games with python
- cbse class 11 computer science syllabus 2021 22
- introduction to python
- the python library reference university of idaho
- python 3 cheat sheet
- s python cheat sheet data science free
- python mcq multi choice questions neville wadia
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