PROGRAMMING:JMU Python - exception - student achievement processing intermediate Edition
Xiao Ming is helping the teacher to process the data. The first line of the data is n, which means there are n lines of integer scores to be counted.
Next, input n scores in succession. If you input an error (` non integer '), you will be prompted with' error! Reinput',
And output the wrong data. And then re-enter, until you enter n correct scores before exiting. If the whole
If there is no error data in the input process, prompt 'all OK'. Finally, output the average value of all the students and keep the two values
Little bit
Count.
**Note: * * the program can handle small errors appropriately. For example, if there are spaces on the left and right of some data, remove them first
The space is processed again.
###Input format:
The first line, N, represents the correct number of rows to be entered next.
Then input the score. If it is wrong, you will be prompted to re-enter it until you input n rows of correct data.
###Output format:
If there is no exception in the input process, output 'all OK'.
###Input sample 1:
```in
three
one
two
three
```
###Output sample 1:
```out
All OK
avg grade = 2.00
```
###Input sample 2:
```in
three
one
#
b
two
three
```
###Output sample 2:
```out
Error for data #! Reinput
Error for data b! Reinput
avg grade = 2.00
```
answer:If there is no answer, please comment
Next, input n scores in succession. If you input an error (` non integer '), you will be prompted with' error! Reinput',
And output the wrong data. And then re-enter, until you enter n correct scores before exiting. If the whole
If there is no error data in the input process, prompt 'all OK'. Finally, output the average value of all the students and keep the two values
Little bit
Count.
**Note: * * the program can handle small errors appropriately. For example, if there are spaces on the left and right of some data, remove them first
The space is processed again.
###Input format:
The first line, N, represents the correct number of rows to be entered next.
Then input the score. If it is wrong, you will be prompted to re-enter it until you input n rows of correct data.
###Output format:
If there is no exception in the input process, output 'all OK'.
###Input sample 1:
```in
three
one
two
three
```
###Output sample 1:
```out
All OK
avg grade = 2.00
```
###Input sample 2:
```in
three
one
#
b
two
three
```
###Output sample 2:
```out
Error for data #! Reinput
Error for data b! Reinput
avg grade = 2.00
```
answer:If there is no answer, please comment