Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Question

deleted 46 characters in body
Source Link

Inspired by this question.

Given a list containing numbers, print:

  • The sum and product of the numbers in the list
  • The average and median
  • The differences between each term in the list (e.xg. [1,2,3] -> [1,1]: 1+1=2, 2+1=3)
  • The list, sorted ascending
  • The minimum and maximum of the list
  • The standard deviation of the list

For reference:

Standard Deviation
Standard Deviation
Where μ

$$\sigma=\sqrt{\frac1N\sum^N_{i=1}(x_i-\mu)^2}$$

Where \$\mu\$ is the mean average, xi\$x_i\$ is the i\$i\$th term in the list, and N\$N\$ is the length of the list.

Shortest code wins. Good luck!

Inspired by this question.

Given a list containing numbers, print:

  • The sum and product of the numbers in the list
  • The average and median
  • The differences between each term in the list (e.x. [1,2,3] -> [1,1]: 1+1=2, 2+1=3)
  • The list, sorted ascending
  • The minimum and maximum of the list
  • The standard deviation of the list

For reference:

Standard Deviation
Standard Deviation
Where μ is the mean average, xi is the ith term in the list, and N is the length of the list.

Shortest code wins. Good luck!

Inspired by this question.

Given a list containing numbers, print:

  • The sum and product of the numbers in the list
  • The average and median
  • The differences between each term in the list (e.g. [1,2,3] -> [1,1]: 1+1=2, 2+1=3)
  • The list, sorted ascending
  • The minimum and maximum of the list
  • The standard deviation of the list

For reference:

Standard Deviation

$$\sigma=\sqrt{\frac1N\sum^N_{i=1}(x_i-\mu)^2}$$

Where \$\mu\$ is the mean average, \$x_i\$ is the \$i\$th term in the list, and \$N\$ is the length of the list.

Shortest code wins. Good luck!

replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Source Link

Inspired by this question this question.

Given a list containing numbers, print:

  • The sum and product of the numbers in the list
  • The average and median
  • The differences between each term in the list (e.x. [1,2,3] -> [1,1]: 1+1=2, 2+1=3)
  • The list, sorted ascending
  • The minimum and maximum of the list
  • The standard deviation of the list

For reference:

Standard Deviation
Standard Deviation
Where μ is the mean average, xi is the ith term in the list, and N is the length of the list.

Shortest code wins. Good luck!

Inspired by this question.

Given a list containing numbers, print:

  • The sum and product of the numbers in the list
  • The average and median
  • The differences between each term in the list (e.x. [1,2,3] -> [1,1]: 1+1=2, 2+1=3)
  • The list, sorted ascending
  • The minimum and maximum of the list
  • The standard deviation of the list

For reference:

Standard Deviation
Standard Deviation
Where μ is the mean average, xi is the ith term in the list, and N is the length of the list.

Shortest code wins. Good luck!

Inspired by this question.

Given a list containing numbers, print:

  • The sum and product of the numbers in the list
  • The average and median
  • The differences between each term in the list (e.x. [1,2,3] -> [1,1]: 1+1=2, 2+1=3)
  • The list, sorted ascending
  • The minimum and maximum of the list
  • The standard deviation of the list

For reference:

Standard Deviation
Standard Deviation
Where μ is the mean average, xi is the ith term in the list, and N is the length of the list.

Shortest code wins. Good luck!

replaced http://www.mathsisfun.com/ with https://www.mathsisfun.com/
Source Link

Inspired by this question.

Given a list containing numbers, print:

  • The sum and product of the numbers in the list
  • The average and median
  • The differences between each term in the list (e.x. [1,2,3] -> [1,1]: 1+1=2, 2+1=3)
  • The list, sorted ascending
  • The minimum and maximum of the list
  • The standard deviation of the list

For reference:

Standard Deviation
Standard Deviation http://www.mathsisfun.com/data/images/standard-deviation-formula.gifStandard Deviation
Where μ is the mean average, xi is the ith term in the list, and N is the length of the list.

Shortest code wins. Good luck!

Inspired by this question.

Given a list containing numbers, print:

  • The sum and product of the numbers in the list
  • The average and median
  • The differences between each term in the list (e.x. [1,2,3] -> [1,1]: 1+1=2, 2+1=3)
  • The list, sorted ascending
  • The minimum and maximum of the list
  • The standard deviation of the list

For reference:

Standard Deviation
Standard Deviation http://www.mathsisfun.com/data/images/standard-deviation-formula.gif
Where μ is the mean average, xi is the ith term in the list, and N is the length of the list.

Shortest code wins. Good luck!

Inspired by this question.

Given a list containing numbers, print:

  • The sum and product of the numbers in the list
  • The average and median
  • The differences between each term in the list (e.x. [1,2,3] -> [1,1]: 1+1=2, 2+1=3)
  • The list, sorted ascending
  • The minimum and maximum of the list
  • The standard deviation of the list

For reference:

Standard Deviation
Standard Deviation
Where μ is the mean average, xi is the ith term in the list, and N is the length of the list.

Shortest code wins. Good luck!

Tweeted twitter.com/#!/StackCodeGolf/status/219152172456214531
"average" is ambiguous, changed to "mean average"
Source Link
Loading
Source Link
beary605
  • 4.4k
  • 2
  • 27
  • 53
Loading

AltStyle によって変換されたページ (->オリジナル) /