Jump to content

leahmander

Members
  • Posts

    1
  • Joined

  • Last visited

leahmander's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. The last two examples of the String/ String Format section are displayed incorrectly before you select to run the example. This is how they are displayed: quantity = 3 itemno = 567 price = 49.95 myorder = "I want {} pieces of item {} for {} dollars." print(str.format(quantity, itemno, price)) quantity = 3 itemno = 567 price = 49.95 myorder = "I want to pay {2} dollars for {0} pieces of item {1}." print(str.format(quantity, itemno, price)) This is how they should be displayed: quantity = 3 itemno = 567 price = 49.95 myorder = "I want {} pieces of item {} for {} dollars." print(myorder.format(quantity, itemno, price)) quantity = 3 itemno = 567 price = 49.95 myorder = "I want to pay {2} dollars for {0} pieces of item {1}." print(myorder.format(quantity, itemno, price))
×
×
  • Create New...