Софтуерно Инженерство
Loading...
ivan23 avatar ivan23 0 Точки

Greater of Two Values (Python)

Здравейте, това решение ми дава 80 точки в judge https://judge.softuni.bg/Contests/Compete/Index/922#6 . Някой би ли ми казал къде е проблема в кода https://pastebin.com/pkX1gTMG

БЛАГОДАРЯ!!!

Тагове:
0
Python
dtsavkov avatar dtsavkov 1 Точки

Hints vs Solution vs Judge [100/100] :)

  1. For this function you need to create three functions with the same name and different signatures
  2. Create a function which will compare integers.
  3. Lastly you need to create a function to compare the other types.
  4. The last step is to read the input, use appropriate variables and call the function you’ve just written

 

def comp_input(v1, v2):
    if v1 > v2:
        return v1
    else:
        return v2

inputType = input()
value1 = input()
value2 = input()
result = comp_input(value1, value2)
print(result)

 

0