In this HackerRank Python: Division problem solution we have given two integers a and b. we need to print the result of integer division a//b and result of float division a/b on the separate lines.
HackerRank Python: Division problem solution
# Enter your code here. Read input from STDIN. Print output to STDOUT>>>
from __future__ import division
a = input()
b = input()
print a//b
print a/b
Problem solution in Python 3 programming.
if __name__ == '__main__':
a = int(input())
b = int(input())
print(a//b)
print(a/b)
Here in the above program, we are using the input() function to get the values from the user. and then we are printing the value of a//b and a/b on the separate lines using the print function. you can try the solution and also add your own code and test out the output.

0 Comments