Answer
$Code$
Work Step by Step
$Code:$
rate = int(input("Enter the exchange rate from dollars to RMB: "))
option = int(input("Enter 0 to convert dollars to RMB and 1 vice versa: "))
amount = 0
if option == 0:
$ $ $ $ amount = int(input("Enter the dollar amount:"))
$ $ $ $ print("{} is {} yaun".format(amount, (amount * rate)))
elif option == 1:
$ $ $ $ print("Enter The RMB amount:")
$ $ $ $ print("{} yaun is {}".format(amount, (((amount * 100) / rate) / 100)))
else:
$ $ $ $ print("incorrect input")