-
Notifications
You must be signed in to change notification settings - Fork 0
/
RunCollatz.py
executable file
·47 lines (34 loc) · 946 Bytes
/
RunCollatz.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env python3
# ------------------------------
# projects/collatz/RunCollatz.py
# Copyright (C) 2014
# Glenn P. Downing
# ------------------------------
"""
To run the program
% coverage3 run --branch RunCollatz.py < RunCollatz.in
To obtain coverage of the run:
% coverage3 report -m
To document the program
% pydoc -w Collatz
note there is no extension .py
"""
# -------
# imports
# -------
import sys
from Collatz import collatz_solve
# ----
# main
# ----
collatz_solve(sys.stdin, sys.stdout)
"""
% coverage3 run --branch RunCollatz.py < RunCollatz.in > RunCollatz.out
% coverage3 report -m
Name Stmts Miss Branch BrMiss Cover Missing
---------------------------------------------------------
Collatz 18 0 6 0 100%
RunCollatz 5 0 0 0 100%
---------------------------------------------------------
TOTAL 23 0 6 0 100%
"""