Where do I start?
Let's go with simple stuff:
List<double> speeds = new List<double>() { _throw, _throw, _throw, _throw };
...
Console.WriteLine($" The average softball throw is {speeds}");
No, it isn't.
speeds
is a collection - specifically a List of items - and that isn't an average at all. So what it will print is always the same:
The average softball throw is System.Collections.Generic.List`1[System.Double]
Because the system doesn't how how you want the collection of items displayed, so it uses the name of the object type.
To print an average, you need to sum all the values, and divide that by the number of values you added together.
av = (1 + 2 + 3 + 4 + 5) / 5 = 3
Now let's get a bit more complicated:
Random numgen = new Random();
int _throw = numgen.Next(90, 100);
List<double> speeds = new List<double>() { _throw, _throw, _throw, _throw };
speeds.Add(_throw);
Won't add different values to your collection - it will add the same value 5 times.
When you do an assignment:
int _throw = numgen.Next(90, 100);
it assigns the current value to _throw, not "remembers what it was created by". To assign a set of random numbers 5 times, you need to actually call the Random.Next method five times:
Random numgen = new Random();
List<double> speeds = new List<double>();
speeds.Add(numgen.Next(90, 100));
speeds.Add(numgen.Next(90, 100));
speeds.Add(numgen.Next(90, 100));
speeds.Add(numgen.Next(90, 100));
speeds.Add(numgen.Next(90, 100));
Or use a loop:
Random numgen = new Random();
List<double> speeds = new List<double>();
for (int i = 0; i < 5; I++)
{
speeds.Add(numgen.Next(90, 100));
}
Then we come to this bit:
foreach (double speed in speeds)
{
result += _throw;
}
result = speeds.Count;
Which just throws away the result of the summation by overwriting it with the number of items count ...
I know you've only been at this a short while, but you are making a major mistake: you are jumping straight into code. Don't do that: sit down and think first, plan what you want to do, and then check & refine the plan until you are sure it will work. Then start coding and testing. Jumping right into code means that you are making it up as you go along, and that leads to errors like these!
Make a copy of that code, then delete it all and start again. When you get it working (and I strongly recommend you learn to use the debugger, it will show you exactly what your code is doing while it runs) compare the new code with this and you will see the difference!
Good luck!