2023 NOC Contest Maker Wisdom Programming Competition Python Semi-final Simulation Questions (2)

The topic comes from: NOC Contest Maker Wisdom Programming Competition Python Semi-final Simulation Questions (2)

NOC Contest Maker Wisdom Programming Competition Python Semi-final Simulation Questions (2)

first question:

Write a performance evaluation system. When the grades of Chinese, Mathematics and English are input, the total grades of the three courses and their grades are output.

(1) The program prompts the user to input three numbers, the numbers represent Chinese, mathematics, and English scores respectively, and the corresponding variable names

It is Chinese, Math, English, and calculate the sum of the three scores (score) for output.

Note: Add "mathematics:", "language:" and "English:" respectively in the input () function, such as input ("language:").

(2) Look at the comparison table of total grades in the above figure, compare the scores, and output the grades of the corresponding intervals.

Example: Input: 909090. Output: 270 Excellent

The answer procedure is as follows:

math = int(input("数学:"))chinese = int(input("语文:"))english = int(input("英语:"))# 把数学、语文、英语的分数进行累计,结果储存在变量score中score = math + chinese + english

Guess you like

Origin blog.csdn.net/IT_Scratch/article/details/130796851