Python: Division - HackerRank Solution
In this Python HackerRank Division Problem, we have to read two integers a and b from STDIN and perform division.
{tocify} $title={Table of Contents}
HackerRank Python Division Problem
A solution in Python 2 Syntax:
from __future__ import division
# floating point division
print 4 / 3
# integer division
print 4 // 3
print(4 / 3)
print(4 // 3)
div>Solution of HackerRank Python Division Problem
# Python: Division - Hacker Rank Solution
from __future__ import division
if __name__ == '__main__':
a = int(raw_input())
b = int(raw_input())
# Python: Division - Hacker Rank Solution START
print(a//b);
print(a/b);
# Python: Division - Hacker Rank Solution END
#Solution by Myeduwaves
Also Check:
All the best!
Tags:
HackerRank Python