0
Python data science 3.2 practice. Not sure what Iâm doing wrong
https://sololearn.com/coach/1150/?ref=app If anyone could let me know what Iâm doing wrong that would be great. If that link doesnât show the problem I can post it.
9 Answers
+ 4
Panda let's start by creating the dataset
it says
5 never or 5 zeros
8 one time 8 ones
4 two times 4 twos
3 three times 3 threes
Vaccine = [ so what goes in here ? ]
I just told you.
+ 3
Panda show us your code not the question / as you want help not the answer.
The community is not here to do your work for you.
Please show us your attempt.
+ 3
Panda = [0,0,0,0,0,1,1,1,1,1,1,1,1,2,2,2,2,3,3,3]
+ 1
BroFar ohhhh hahaha ok i wasnt paying attention to that thanks for the help :)
+ 1
Oh so its a set of them. I thought it was just a multiplication of them. Thanks BroFar
0
Using the same vaccinations dataset, which includes the number of times people got the flu vaccine.
The dataset contains the following numbers:
never: 5
once: 8
twice: 4
3 times: 3
Question:
Calculate and output the variance.
Declare a list with the data and use a loop to calculate the value.
We will soon learn about easier ways to calculate the variance and other summary statistics using Python. For now, use Python code to calculate the result using the corresponding equation.
0
BroFar oh mb i thought that giving the link gave my code just a sec
0
#your code goes here
vacine = [5,8,4,3]
c=0
for x in vacine:
c=(x)**2+c
variance=(c/len(vacine))
standev=variance**(1/2)
print(standev)
print(variance)
0
BroFar #your code goes here
vacine = [0,8,8,9]
c=0
for x in vacine:
c=(x)**2+c
variance=(c/len(vacine))
standev=variance**(1/2)
print(standev)
print(variance)
Is there something else that i have wrong or should this work