304 North Cardinal St.
Dorchester Center, MA 02124
The provided code stub read 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.
a = 3
b = 5
The first line contains the first integer, a.
The second line contains the second integer, b.
Print the two lines as described above.
Sample Input 0
Sample Output 0
a = int(raw_input()) b = int(raw_input()) print a/b print a/float(b)
if __name__ == '__main__': a = int(input()) b = int(input()) print(a//b) print(a/b)
import sys alls =  for line in sys.stdin: alls.append(int(line.strip())) print alls/alls print float(alls)/float(alls)
# Enter your code here. Read input from STDIN. Print output to STDOUT num = int(input()) den = int(input()) print(num//den) print(num/den)
Python: Division Hacker Rank Problem is available on Hacker Rank for Free, if you are stuck anywhere between a compilation, just visit Queslers to get Python: Division Hacker Rank Solution.
I hope this Python: Division Hacker Rank Solution would be useful for you to learn something new from this problem. If it helped you then don’t forget to bookmark our site for more Hacker Rank, Leetcode, Codechef, Codeforce Solution.
This Problem is intended for audiences of all experiences who are interested in learning about Data Science in a business context; there are no prerequisites.
More Hacker Rank Problem & Solutions >>