DNPotapov / Codewars-katas-

0 stars 0 forks source link

UEFA EURO 2016 (8 kyu) #16

Open DNPotapov opened 1 year ago

DNPotapov commented 1 year ago
def uefa_euro_2016(teams, scores):
    if scores[0] == scores[1]:
        return f"At match {teams[0]} - {teams[1]}, teams played draw."
    else:
        return f"At match {teams[0]} - {teams[1]}, {teams[0]} won!" if scores[0] > scores[1] else f"At match {teams[0]} - {teams[1]}, {teams[1]} won!"
DNPotapov commented 1 year ago

Finish the uefaEuro2016() function so it return string just like in the examples below:

uefa_euro_2016(['Germany', 'Ukraine'],[2, 0]) # "At match Germany - Ukraine, Germany won!" uefa_euro_2016(['Belgium', 'Italy'],[0, 2]) # "At match Belgium - Italy, Italy won!" uefa_euro_2016(['Portugal', 'Iceland'],[1, 1]) # "At match Portugal - Iceland, teams played draw."

DNPotapov commented 1 year ago

https://www.codewars.com/kata/57613fb1033d766171000d60