print("Welcome to Currency Converter!")
print("A- USD to PKR")
print("B- PKR to USD")
choice = input("Plz enter your choice: ").lower()
if choice == "a":
dollars = float(input("Plz enter the amount of dollars: "))
pkr = dollars * 261.17
print(f"{dollars} dollar(s) is equal to {round((pkr), 2)} Pakistani Rupees!")
elif choice == "b":
pkr = float(input("Plz enter the amount of rupees: "))
dollars = pkr / 261.17
print(f"{pkr} Rupee(s) is equal to {round((dollars), 2)} US dollars!")
else:
print("invalid input.")
Comments
Post a Comment
Write something to CodeWithAbdur!