File: pigs.py

package info (click to toggle)
python-trubar 0.3.4-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 716 kB
  • sloc: python: 2,968; sh: 375; makefile: 3; javascript: 1
file content (9 lines) | stat: -rw-r--r-- 263 bytes parent folder | download
1
2
3
4
5
6
7
8
9
class PigManager:
    def __init__(self, n):
        if not 5 <= n <= 20:
            raise ValueError(
                f"Wrong number: {n} must be between 5 and 20.")
        self.n = n

    def walk(self):
        print(f"{self.n} little pigs went for a walk")