We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Arithmetic Operators
Arithmetic Operators
+ 44 comments a = int(input()) b = int(input()) print('{0} \n{1} \n{2}'.format((a + b), (a - b), (a * b)))
+ 19 comments Here is Python solution from my HackerrankPractice repository:
a, b = int(input()), int(input()) print((a + b), (a - b), (a * b), sep='\n')
Feel free to ask if you have any questions :)
+ 1 comment Since version 3.6 Python have got f-strings "formatted strings" so it's as easy as this:
print(f"{a+b}\n{a-b}\n{a*b}")
+ 0 comments when a constraint is given so how can set the maximum or minimum limit for the input numbers
+ 4 comments if name == 'main':
what does this line mean? Can anyone please explian?
Load more conversations
Sort 721 Discussions, By:
Please Login in order to post a comment