Helpr运行这个程序

时间:2017-10-02 21:29:46

标签: python

我的代码目前看起来像这样

def Process (Name, Score):

S = ""

Count = 0

    while (Count < Score):
        Count = Count + 1
        S = S + "|"
    #S = S + Name, Score 
    S = S + Name
    S = S + str(Score)

    return S

def Main():

    Names = ["Fred","Sam","Mary","Carol","Joe","Bob","Sue"]
    Scores = [78,34,97,69,82,46,89]
    L = 7 #list length
    Count2 = 0  
    while (Count2 < L):
        Process (Names[0 + Count2], Scores[0 + Count2])
        Count2 = Count2 + 1


    return

我希望能够使用Main()程序中的2个相应列表运行Process(Name,Score)。 Process程序返回一个带有名称和分数的文本条形图,我希望一次显示所有7个,同时能够在将来更改列表。到目前为止,我在Main()中的帽子不起作用,但是过程确实如此。 如果您能提供帮助,请提前致谢!

0 个答案:

没有答案