Hacker Rank Problem In Python

HackerRank – Python: Division In Hindi

Hacker Rank

HakcerRank – Python: Division –  Is Post Me HackerRank Ke Python Programming Language Se Related Competitive Questions Ka Answer Hai. Is Post Me HackerRank – Python: Division No 4 Ko Solve Kiya Gaya Hai.

HackerRank – Python Solution Series Ke Sabhi Questions Ka Solved Codes Ko Diya Jayega. Saath Hi Hindi Me Explain Bhi Kiya Jayega.

Yadi Aapne Abhi Tak Python Full Course In Hindi Read Nhi Kiya Hai To Aap Pahle Wo Kare Nhi To Aapko HakcerRank- Python Solution Ke Tutorial Ko Understand Karne Main Dikkat Ho Sakti Hai.

HackerRank – Python: Division

Contents

Task

  • Two integers ko input karna hai and variable a and b me store karna hai.
  • first line par varibale a and b ke division ko print kare.
  • second line par variable a and b ke float division result ko print kare.

Example

a = 3

b = 5

Input

First line par variable a ke liye integer input lena hai

Second line par variable b ke liye integer input lena hai

Output

  • a and b ke interger division karne par : 3//5 = 0
  • a and b ke float division karne par : 3 / 5 = 0.6

Sample Input 0

4
3

Sample Output 0

1
1.33333333333

Explanation 0

Variable a and b ke liye integer input lena hai.

a and b ka integer division ko print kare.

a ab b ke float division ko print kare.

Solution

if __name__ == '__main__':
    a = int(input())
    b = int(input())
    
    print(a//b)
    print(a/b)

STEP 1 – Sabse Pahle variable a ke value ke liye input lena hai, int(input()) phir use integer me convert karna hai.

STEP 2 – Sabse Pahle variable b ke value ke liye input lena hai, int(input()) phir use integer me convert karna hai.

STEP 3 – a and b ke integer division ko print karna hai. print(a//b)

STEP 4 – a and b ke float division ko print karna hai. print(a/b)

Upar Diye Hue Code Ko Aap Apne Code Editor Me Use Kar Sakte Hai And Practice Kar Sakte Hai.

Disclaimer

The Above Whole Problem Statement Is Given By Hackerrank.Com But The Solution Is Generated By The masterprograming.com Authority If Any Of The Query Regarding This Post Or Website Fill The Contact Us Form.

-Masterprogramming

Friends Mujhe Umeed Hai Ki Aapko HackerRank – Arithmetic Operators In Hindi   Ke Bare Mai 100% Jankari Ho Gayi Hogi | Agar Aapko Learn Karne Main Dikkat Aa Rahi Hai To Aap Mujhse Se Contact Kar Sakte Hai |

Leave a Reply

Your email address will not be published. Required fields are marked *