Commit 6e20ebd0 authored by Toby Hodges's avatar Toby Hodges

fixed MCQ code snippets for Python 3.

parent 2b359dd3
......@@ -228,7 +228,7 @@
"extrashopping = ['cheese', 'flour', 'eggs', 'spaghetti', 'sausages', 'bread']\n",
"for item in extrashopping:\n",
" if item not in shopping: \n",
" print item, \"is already in the list.\"\n",
" print(item, \"is already in the list.\")\n",
" else: \n",
" shopping.append(item)\n",
"print(shopping) \n",
......@@ -249,7 +249,7 @@
" if item in shopping:\n",
" shopping.append(item)\n",
" else: \n",
" print item, \"is already in the list.\"\n",
" print(item, \"is already in the list.\")\n",
"print(shopping)\n",
"```"
]
......@@ -266,7 +266,7 @@
"extrashopping = ['cheese', 'flour', 'eggs', 'spaghetti', 'sausages', 'bread']\n",
"for item in extrashopping:\n",
" if item in shopping:\n",
" print item, \"is already in the list.\"\n",
" print(item, \"is already in the list.\")\n",
" else: \n",
" shopping.append(item)\n",
"print(shopping)\n",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment