forked from tdwojak/Python2017
a6c2e3af77
# Conflicts: # labs02/test_task.py
15 lines
347 B
Python
15 lines
347 B
Python
import task00, argparse
|
|
|
|
def main():
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument("numbers", nargs="+")
|
|
args = parser.parse_args()
|
|
def a_to_f(a):
|
|
try:
|
|
return float(a)
|
|
except:
|
|
return 0
|
|
print('%f' % (task00.suma(map(a_to_f, args.numbers))))
|
|
|
|
if __name__ == '__main__':
|
|
main() |