1
0
forked from tdwojak/Python2017
Python2017/labs05/task03.py

15 lines
347 B
Python
Raw Normal View History

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