-->

Python: Division - Hacker Rank Solution | Apna Hindi Tech | Hindi Tutorial





Hello Friends 

рдЖрдЬ рд╣рдо рдЖрдкрдХो Hacker Rank рдкрд░ Python Division рдХा рдХंрдк्рд▓ीрдЯ рд╕ॉрд▓्рдпूрд╢рди рдмрддाрдПंрдЧे рд╡рд╣ рднी рдЖрд╕ाрди рднाрд╖ा рдоें। рддो рджोрд╕्рддों рдЪрд▓िрдП рдЬाрдирддे рд╣ैं рд╕ॉрд▓्рдпूрд╢рди ।




Problem:- 
Python: Division - Hacker Rank Solution


Task:-

The provided code stub reads two integers,  and , from STDIN.

Add logic to print two lines. The first line should contain the result of integer division,  // . The second line should contain the result of float division,  / .

No rounding or formatting is necessary.



    Example:-

     a=3

     b=5


    • The result of the integer division .
    • The result of the float division is .


    Print:-

    0
    0.6




    Input Format :-

    The first line contains the first integer, .
    The second line contains the second integer, .



    Output Format :-

    Print the two lines as described above.





    Sample Input 0 :-

    4
    3




    Sample Output 0 :-

    1
    1.33333333333



    Solution :-


    if __name__ == '__main__':

        a = int(input())
        b = int(input())
        print(a//b)
        print(a/b)



    Video Tutorial :-






    DISCLAIMER:-
    The above hole problem statement is given by hackerrank.com but the solution is generated by the  Apna Hindi Tech authority if any of the query regarding this post or website fill the following contact form.

    ......Thank YouЁЯШК......

    рдпрд╣ рднी рдкрдв़ें

    Post a Comment