Articles

Python program to convert us dollars to indian rupees

Python program to convert us dollars to indian rupees


In this python programming guide, we are going to learn to:

  • write a program to convert us dollar to indian rupees in python

Program to convert US Dollar to Indian Rupees in Python

The program to convert us dollar to indian rupees in python is as follows:

 

# Owner : TutorialsInhand Author : Devjeet Roy

usd = float(input("Enter currency in USD: "))
inr = usd * 73

print("The currency in INR is",round(inr,2))

The output of program to convert us dollar to indian rupees in python is as follows:

 

PS C:\Users\DEVJEET\Desktop\tutorialsInHand> python code.py
Enter currency in USD: 1234
The currency in INR is 90082.0

Few important tips about this program

1. We take user input and convert it to float data type.

2. While writing this program, 1 USD = 73 INR (Jan, 2021), so we convert USD to INR as per this rate.

3. Finally, we print the answer, rounding it off to 2 decimal places.

 

Snapshot for python program to convert us dollars to indian rupees:

program to convert us dollar to indian rupees in python

 


Basic Python Programs

Would you like to see your article here on tutorialsinhand. Join Write4Us program by tutorialsinhand.com

About the Author
Devjeet Roy
Full Stack Web Developer & Data Science Enthusiast
Page Views :    Published Date : Feb 10,2021  
Please Share this page

Related Articles

Like every other website we use cookies. By using our site you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service. Learn more Got it!