diff options
Diffstat (limited to 'python/code/03_flt_ops.py')
-rw-r--r-- | python/code/03_flt_ops.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/python/code/03_flt_ops.py b/python/code/03_flt_ops.py new file mode 100644 index 0000000..e3a3cd0 --- /dev/null +++ b/python/code/03_flt_ops.py @@ -0,0 +1,4 @@ +a = float(input('Enter first number: ')) +b = float(input('Enter second number: ')) +print('Concatenation of integer parts:', ''.join(str(int(i)) for i in (a, b))) +print('Sum rounded to 2 decimal places:', round(a + b, 2)) |