这是我的代码:
brand ='apple'
ExchngeRate = 1.45666
message='The price of this %s laptop is %d USD and the exchange rate is %4.2f USD to 1 EUR' % (brand,1299,exchangeRate)
我得到这个错误:
NameError Traceback (most recent call last)
<ipython-input-4-076695279033> in <cell line: 3>()
1 brand ='apple'
2 ExchngeRate = 1.45666`
----> 3 message='The price of this %s laptop is %d USD and the exchange rate is %4.2f USD to 1 EUR' % (brand,1299,exchangeRate)
NameError: name 'exchangeRate' is not defined