Python Division Hackerrank Solution
Published November 1, 2023 by Jarvis Silva
Looking for the Hackerrank division solution in Python? You are at the right place. In this article, I will share the python division hackerrank solution.
Hackerrank is a popular online platform which has many programming challenges and competitions which allows developers to participate into them and improve their programming skill.
Python Division Hackerrank Question
The provided code stub reads two integers, a and b, from STDIN. Add logic to print two lines. The first line should contain the result of integer division, a // b. The second line should contain the result of float division, a / b. No rounding or formatting is necessary.
You can find the full question of this problem here: Python Division Hackerrank Question.
Before moving to the solution you should definately try to do this on your own it is very easy but still if you can’t solve it don’t worry you can check the below solution and understand this program.
Python Division Hackerrank Solution
num = int(input())
denominator = int(input())
print(num//denominator)
print(num/denominator)
Above is the python solution for division Hackerrank challenge, you can submit the above code in hackerrank and it should show you congratulations you solved this challenge.
This was for this article, I hope you found what you were looking and if you want more hackerrank solutions then visit here: Hackerrank python solutions.
Thank you for reading, Happy coding 😊