第 10 步:干得好!现在,让我们的精灵说出原价。

请记住, pricefloat的。要将其添加到string ,我们需要使用str()对其进行转换

  • 在逻辑中,单击并拖入Convert to String
  • str()中的my_var更改为price
  • =左侧的price_string my_var

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • 提交作品
  • 下个活动
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)