Total Complexity | 3 |
Total Lines | 14 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | """A sample module.""" |
||
2 | |||
3 | import log |
||
4 | |||
5 | |||
6 | def feet_to_meters(feet): |
||
7 | """Convert feet to meters.""" |
||
8 | try: |
||
9 | value = float(feet) |
||
10 | except ValueError: |
||
11 | log.error("Unable to convert to float: %s", feet) |
||
12 | else: |
||
13 | return (0.3048 * value * 10000.0 + 0.5) / 10000.0 |
||
14 |