NotASeagull wrote:So, I'm pretty new to python, but I've got an assignment in which I must calculate the average of a range of variables given by the user. Variables are supposed to be grades.

I've got:

for c in range (0,50)

Grade = input ("What is the student's grade?')

How do I get the average of all the user''s inputs?

Should I use import statistic mean?

Also, how could I get how many graded are below 50 and above or equal to 50

Thanks!

Looking at your post, you say you need variables, so how many variables do you need? (Hint: the number is contained in your post).

Again looking at your post, you can see that you know how many grades there are and what those grades are. How would you find the average grade?

One piece of advice I would give is the line:

- Code: Select all
`Grade = input ("What is the student's grade?)`

is going to return a 'string' value. Since the rest of your script will be dealing with numbers, how can you convert this from a 'string' value to a 'numerical' value?

Let us know how you progress.