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.
- Prepare
- Python
- Introduction
- Python: Division
- Discussions
Python: Division
Python: Division
+ 0 comments def div(n,x): print(int(n/x)) print(float(n/x))
if name == 'main': a = int(input()) b = int(input())
div(a,b)
+ 0 comments a=3 b=5 print(a//b) print(a/b)
+ 0 comments a = int(input()) b = int(input()) div=a//b divs=a/b print(div) print(divs)
+ 0 comments def int_division(a,b) : return a//b def float_division(a,b) : return a/b print(int_division(a,b)) print(float_division(a,b))
+ 0 comments By using def function
if __name__ == '__main__': a = int(input()) b = int(input()) def int_division(a,b) : return a//b def float_division(a,b) : return a/b print(int_division(a,b)) print(float_division(a,b))
Load more conversations
Sort 758 Discussions, By:
Please Login in order to post a comment