1
0
forked from tdwojak/Python2017
Python2017/labs05/task03.py
2018-01-02 02:45:14 +01:00

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()