FirstName = raw_input("Please enter your first name: ")
Scores = map(int, raw_input("Please enter your four golf scores: ").split())
print "Score analysis for %s:" % FirstName
print "Your golf scores are: " + Scores
print "The lowest score is " + min(Scores)
print "The highest score is" +max(Scores)
我正在尝试将我用 C++ 编写的基本程序转换为 python,我想输入一个由 4 个整数组成的数组,然后计算最小值、最大值和其他一些东西。我希望用户能够输入“70 71 72 73”之类的四个分数,然后将这四个分数存储为四个整数的数组(列表?)。
谢谢你的帮助!