diff --git a/UFCFVQ-15-M Programming Task 1 Template.ipynb b/UFCFVQ-15-M Programming Task 1 Template.ipynb index 867e06c716315e0fd47467ef261cd9c38f7996e5..197519b0dc21ecfe135a6ed3424905a2373bd700 100644 --- a/UFCFVQ-15-M Programming Task 1 Template.ipynb +++ b/UFCFVQ-15-M Programming Task 1 Template.ipynb @@ -120,11 +120,42 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 3, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The minimum value is: 0\n", + "The maximum value is: 29\n" + ] + } + ], "source": [ - "# add code here" + "numbers_list = [\n", + " 29, 17, 28, 6, 14, 7, 4, 27, 21, 15,\n", + " 10, 16, 24, 26, 3, 11, 13, 8, 23, 9,\n", + " 0, 22, 12, 2, 18, 19, 5, 1, 20, 25\n", + "]\n", + "\n", + "# Create two functions that will allow you to find the min/max values, in a given list.\n", + "\n", + "def min_value(numbers):\n", + " return min(numbers)\n", + "\n", + "def max_value(numbers):\n", + " return max(numbers)\n", + "\n", + "# Find the min/max values within the list\n", + "\n", + "The_min_value = min_value(numbers_list)\n", + "The_max_value = max_value(numbers_list)\n", + "\n", + "# Display the result\n", + "\n", + "print(f\"The minimum value is: {The_min_value}\")\n", + "print(f\"The maximum value is: {The_max_value}\")\n" ] }, {