-->
当前位置:首页 > 题库

PROGRAMMING:JMU Python score checking

Luz5年前 (2021-05-10)题库431
From the keyboard, input the scores of all courses of a student in the format of "Course Name: Scores". Each course occupies one line and ends with a blank line. Then "please input the course to query" will be prompted. The user can input the course name from the keyboard, query and output the course scores, and request exception handling, and capture the non-existent courses.
###Input format:
Enter the students' scores of all courses, one line for each course, in the format of "Course Name: Scores", and end with a blank line
Enter the course name when prompted
###Output format:
If the course exists, the score will be output directly, otherwise it will be prompted that there is no such course“
###Input sample 1:
```in
Mathematics: 96
English: 82
Computer: 76
Ideological and Political Education: 90
computer
```
###Output sample 1:
```out
Please enter the course you want to query:
seventy-six
```
###Input sample 2:
```in
Mathematics: 96
English: 82
Computer: 76
Ideological and Political Education: 90
Mathematics A
```
###Output sample 2:
```out
Please enter the course you want to query:
There is no such course
```







answer:If there is no answer, please comment