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.

3rd Apr 2021, 10:24 PM
Panda
Panda - avatar
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.
3rd Apr 2021, 11:40 PM
BroFar
BroFar - avatar
+ 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.
3rd Apr 2021, 11:05 PM
BroFar
BroFar - avatar
+ 3
Panda = [0,0,0,0,0,1,1,1,1,1,1,1,1,2,2,2,2,3,3,3]
4th Apr 2021, 12:03 AM
BroFar
BroFar - avatar
+ 1
BroFar ohhhh hahaha ok i wasnt paying attention to that thanks for the help :)
3rd Apr 2021, 11:42 PM
Panda
Panda - avatar
+ 1
Oh so its a set of them. I thought it was just a multiplication of them. Thanks BroFar
4th Apr 2021, 12:06 AM
Panda
Panda - avatar
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.
3rd Apr 2021, 10:25 PM
Panda
Panda - avatar
0
BroFar oh mb i thought that giving the link gave my code just a sec
3rd Apr 2021, 11:06 PM
Panda
Panda - avatar
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)
3rd Apr 2021, 11:07 PM
Panda
Panda - avatar
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
3rd Apr 2021, 11:54 PM
Panda
Panda - avatar