1
0
Fork 0
Python2017/labs05/task02.py

16 lines
487 B
Python
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""* zad. 2 **
Uodpornoj program z zad. 1 w następujący sposób: do programu mogą zostać przekazane argumenty,
które nie mają wartości liczbowej (przyjmijmy, że ich wartość to 0).
Skorzystaj z mechanizmu wyjątków: złap wyjątek, jeżeli argumenty nie da się skonwertować na
liczbę zmiennoprzecinkową."""
import task00
import sys
def main():
print(task00.suma(sys.argv[1:]))
#print(task00.suma(['blabla',35.42,24.5]))
if __name__ == "__main__":
main()