Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ThePDSProject
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
UWE_ 23086369_2023
ThePDSProject
Commits
486e7622
Commit
486e7622
authored
1 year ago
by
UWE_ 23086369_2023
Browse files
Options
Downloads
Patches
Plain Diff
arithmetic mean
parent
62c71fab
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
UFCFVQ-15-M Programming Task 1 Template.ipynb
+33
-4
33 additions, 4 deletions
UFCFVQ-15-M Programming Task 1 Template.ipynb
with
33 additions
and
4 deletions
UFCFVQ-15-M Programming Task 1 Template.ipynb
+
33
−
4
View file @
486e7622
...
@@ -19,10 +19,39 @@
...
@@ -19,10 +19,39 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
null
,
"execution_count":
1
,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [
"source": []
{
"name": "stdout",
"output_type": "stream",
"text": [
"The mean value is: 14.5\n"
]
}
],
"source": [
"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",
"# Find the average of a given list of numbers\n",
"\n",
"def arithmetic_mean(numbers):\n",
" total_sum = sum(numbers) \n",
" mean_value = total_sum / len(numbers) \n",
" return mean_value \n",
"\n",
"# Execute the function and save the resulting value\n",
"\n",
"mean_value = arithmetic_mean(numbers_list) \n",
"\n",
"# Display the average value(mean)\n",
"\n",
"print(f\"The mean value is: {mean_value}\") \n"
]
},
},
{
{
"cell_type": "markdown",
"cell_type": "markdown",
...
@@ -301,7 +330,7 @@
...
@@ -301,7 +330,7 @@
"name": "python",
"name": "python",
"nbconvert_exporter": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"pygments_lexer": "ipython3",
"version": "3.
11.4
"
"version": "3.
9.6
"
},
},
"vscode": {
"vscode": {
"interpreter": {
"interpreter": {
...
...
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
# UFCFVQ-15-M Programming for Data Science
# UFCFVQ-15-M Programming for Data Science
# Programming Task 1
# Programming Task 1
## Student Id:
## Student Id:
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
### Requirement FR1.1 -Find the arithmetic mean using function
### Requirement FR1.1 -Find the arithmetic mean using function
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
numbers_list
=
[
29
,
17
,
28
,
6
,
14
,
7
,
4
,
27
,
21
,
15
,
10
,
16
,
24
,
26
,
3
,
11
,
13
,
8
,
23
,
9
,
0
,
22
,
12
,
2
,
18
,
19
,
5
,
1
,
20
,
25
]
# Find the average of a given list of numbers
def
arithmetic_mean
(
numbers
):
total_sum
=
sum
(
numbers
)
mean_value
=
total_sum
/
len
(
numbers
)
return
mean_value
# Execute the function and save the resulting value
mean_value
=
arithmetic_mean
(
numbers_list
)
# Display the average value(mean)
print
(
f
"
The mean value is:
{
mean_value
}
"
)
```
```
%% Output
The mean value is: 14.5
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
##### MARK:
##### MARK:
#### FEEDBACK:
#### FEEDBACK:
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
### Requirement FR1.2 - Find the standard deviation using function
### Requirement FR1.2 - Find the standard deviation using function
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
``
`
``
`
%%
Cell
type
:
markdown
id
:
tags
:
%%
Cell
type
:
markdown
id
:
tags
:
##### MARK:
##### MARK:
#### FEEDBACK:
#### FEEDBACK:
%%
Cell
type
:
markdown
id
:
tags
:
%%
Cell
type
:
markdown
id
:
tags
:
### Requirement FR1.3 - Find the min/max values using functions
### Requirement FR1.3 - Find the min/max values using functions
%%
Cell
type
:
code
id
:
tags
:
%%
Cell
type
:
code
id
:
tags
:
```
python
```
python
# add code here
# add code here
```
```
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
##### MARK:
##### MARK:
#### FEEDBACK:
#### FEEDBACK:
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
### Requirement FR1.4 - Find the 25th percentile using functions
### Requirement FR1.4 - Find the 25th percentile using functions
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
# add code here
# add code here
```
```
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
##### MARK:
##### MARK:
#### FEEDBACK:
#### FEEDBACK:
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
### Requirement FR1.5 - Find the 50th percentile using functions
### Requirement FR1.5 - Find the 50th percentile using functions
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
# add code here
# add code here
```
```
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
##### MARK:
##### MARK:
#### FEEDBACK:
#### FEEDBACK:
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
### Requirement FR1.6 - Find the 75th percentile using functions
### Requirement FR1.6 - Find the 75th percentile using functions
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
# add code here
# add code here
```
```
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
##### MARK:
##### MARK:
#### FEEDBACK:
#### FEEDBACK:
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
### Requirement FR1.7 - Print the set of summary statistics in tabular form
### Requirement FR1.7 - Print the set of summary statistics in tabular form
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
# add code here
# add code here
```
```
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
##### MARK:
##### MARK:
#### FEEDBACK:
#### FEEDBACK:
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
### Requirement FR1.8 - Read data from a file into memory
### Requirement FR1.8 - Read data from a file into memory
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
# add code here
# add code here
```
```
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
##### MARK:
##### MARK:
#### FEEDBACK:
#### FEEDBACK:
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
### Requirement FR1.9 - Design and build a data structure to store CSV data in memory
### Requirement FR1.9 - Design and build a data structure to store CSV data in memory
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
# add code here
# add code here
```
```
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
##### MARK:
##### MARK:
#### FEEDBACK:
#### FEEDBACK:
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
### Requirement FR1.10 - Create a generic statistical summary function
### Requirement FR1.10 - Create a generic statistical summary function
%% Cell type:code id: tags:
%% Cell type:code id: tags:
```
python
```
python
# add code here
# add code here
```
```
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
##### MARK:
##### MARK:
#### FEEDBACK:
#### FEEDBACK:
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
### Requirement FR1.11 Adherence to good coding standards
### Requirement FR1.11 Adherence to good coding standards
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
##### MARK:
##### MARK:
#### FEEDBACK:
#### FEEDBACK:
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
### Requirement FR1.12 - Process Development report
### Requirement FR1.12 - Process Development report
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
# write here
# write here
%% Cell type:markdown id: tags:
%% Cell type:markdown id: tags:
##### MARK:
##### MARK:
#### FEEDBACK:
#### FEEDBACK:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment