Jul-27-2017, 07:56 PM
(This post was last modified: Jul-28-2017, 10:26 AM by Augustin1340.)
(Jul-27-2017, 06:58 PM)nilamo Wrote: So it's based on ranking? Most goals = 6 points, least goals = 2 points, in between = 4 points?
Yeeesssss, It's exact
I want me base on my code please... I blocke in the function printFinal()
Now; I will wish to add up each point concerning players.
Drogba 6 points
Owen 10 points
Henry 8 points
Sorry, I have to put entirely my code if not impossible to understand
def printOne(name, goal1): score1 = [] for i in range( len( name) ): print("\t\t\t\t" + name[ i ] + "\t " + str(point[i]) + " point - \t" + str( goal1[i]) + " buts") score1.append(point[i]) print(score1) def trisGoal1(name ,goal1): for i in range( len(name)-1, 0, -1 ): for j in range(i): if name[j+1] < name[ j ]: FlagParti = name[ j ] FlagLong = goal1[ j ] name[ j ] = name[ j + 1 ] goal1[ j ] = goal1[ j +1 ] name[ j + 1] = FlagParti goal1[ j + 1 ] = FlagLong def printSeconde(name, goal2): score2 = [] for i in range( len( name) ): print("\t\t\t\t" + name[ i ] + "\t " + str(point[i]) + " point - \t" + str( goal2[i]) + " buts") score2.append(point[i]) print(score2) def trisGoal2(name , goal2): for i in range( len(name)-1, 0, -1 ): for j in range(i): if name[j+1] < name[ j ]: FlagParti = name[ j ] FlagLong = goal2[ j ] name[ j ] = name[ j + 1 ] goal2[ j ] = goal2[ j +1 ] name[ j + 1] = FlagParti goal2[ j + 1 ] = FlagLong def printFinal(name, score1, score2): for i in range( len( name) ): print("\t\t\t\t" + name[ i ] + "\t " + " point - \t" + str( score1[i] + score2[i]) ) name = ["Henry", "Owen", "Drogba"]; point = [2,4,6] goal1 = [18,12,6] goal2 = [6,8,5] trisGoal1(goal1, name) printOne(name, goal1) trisGoal2(goal2, name) printSeconde(name, goal2) printFinal(name, point)