Practice
Resources
Contests
Online IDE
New
Free Mock
Events New Scaler
Practice
Improve your coding skills with our resources
Contests
Compete in popular contests with top coders
Events
Attend free live masterclass hosted by top tech professionals
New
Scaler
Explore Offerings by SCALER

# Variability measures

Given an array A containing N integers, find the variance and standard deviation of the array. Print your answer up to 2 decimal points.

Problem Constraints

```1<N<1000. 1<=A[i]<=1000
```

Input Format:

```Number of testcases```For each test space separated integers are listed in a new line.
``````

Ouput Format:

``````standard deviation and variance in this order for each test case in a new line.
``````

Example Input:

``````2
10 10 20 20 30 4
1 2 3 4 5 6 7 8
``````

Example Output:

``````8.6 74.0
2.24 5.0
``````

Note:

• The code for the function is for a single test case as it's called under a loop of range t (number of test cases).
• You have to include code to take input for a single test case.
• Print the output in the required manner for a test case.
• While taking input take care that list members can be float or int.
Hints
• Hints are not available for this problem

## Discussion

Free Mock Assessment
Fill up the details for personalised experience.
All fields are mandatory
Current Employer *
Enter company name *
Select an option *
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
Phone Number *
OTP will be sent to this number for verification
+1 *
+1
Change Number
Phone Number *
OTP will be sent to this number for verification
+1 *
+1
Change Number
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
*Enter the expected year of graduation if you're student
Current Employer *
Company Name *