diff --git a/UFCFVQ-15-M Programming Task 1 Template.ipynb b/UFCFVQ-15-M Programming Task 1 Template.ipynb index 767f526b659ae7f9e04a3d70e88b054804bb7f17..99dc422b29ef846b5da0bf38676f7ba7e721ed0e 100644 --- a/UFCFVQ-15-M Programming Task 1 Template.ipynb +++ b/UFCFVQ-15-M Programming Task 1 Template.ipynb @@ -19,17 +19,9 @@ }, { "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "The mean value is: 14.5\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "numbers_list = [\n", " 29, 17, 28, 6, 14, 7, 4, 27, 21, 15,\n", @@ -70,17 +62,9 @@ }, { "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "The standard deviation is: 8.65544144839919\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "def find_std(numbers, mean):\n", "\n", @@ -120,18 +104,9 @@ }, { "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "The minimum value is: 0\n", - "The maximum value is: 29\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "numbers_list = [\n", " 29, 17, 28, 6, 14, 7, 4, 27, 21, 15,\n", @@ -176,17 +151,9 @@ }, { "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "The 25th percentile is: 7\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "numbers_list = [\n", " 29, 17, 28, 6, 14, 7, 4, 27, 21, 15,\n", @@ -228,17 +195,9 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "The 50th percentile is: 14\n" - ] - } - ], + "outputs": [], "source": [ "\n", "numbers_list = [\n", @@ -277,17 +236,9 @@ }, { "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "The 75th percentile is: 21\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "numbers_list = [\n", " 29, 17, 28, 6, 14, 7, 4, 27, 21, 15,\n", @@ -326,25 +277,9 @@ }, { "cell_type": "code", - "execution_count": 7, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Statistic Value\n", - "-------------------------\n", - "Mean 14.50\n", - "STD 8.66\n", - "Min 0\n", - "Max 29\n", - "25% 7\n", - "50% 14\n", - "75% 21\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "\n", "# A summary of the statistics, including the standard deviation, minimum and maximum values, as well, as percentiles.\n", @@ -379,11 +314,21 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ - "# add code here" + "\n", + "# The file path\n", + "file_pathname = '/Users/mscdatascience/Documents/assignment-PDS/mohammad_alsuulaimani_uwe_23086369_2023/task.dat'\n", + "\n", + "# Retrieve the data, from the file and add each line as an element, in the list.\n", + "with open(file_pathname, 'r') as file:\n", + " data_values = [line.strip() for line in file]\n", + "\n", + "# Display the list of data values\n", + "\n", + "print(data_values)\n" ] }, { @@ -403,12 +348,10 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "metadata": {}, "outputs": [], - "source": [ - "# add code here" - ] + "source": [] }, { "cell_type": "markdown", @@ -427,7 +370,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -496,7 +439,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.5" + "version": "3.9.6" }, "vscode": { "interpreter": {