a): print("2nd is great ") else: print("equal") def gmean(a,b): mean = (a+b)/2 print(m" /> a): print("2nd is great ") else: print("equal") def gmean(a,b): mean = (a+b)/2 print(m" /> a): print("2nd is great ") else: print("equal") def gmean(a,b): mean = (a+b)/2 print(m"/>

a problem i faced during learning functions in python

14 Views Asked by At
`def isgreat(a,b):
    if(a>b):
        print("1st number is great")
    elif(b>a):
        print("2nd is great ") 
    else:
        print("equal")


def gmean(a,b):
    mean = (a+b)/2

    print(mean)

a=input("input 1st number")
b=input("input 2nd number")
isgreat(a,b)
gmean(a,b)`

in this program the line mean = (a+b)/2 didnt work saying it was unsupported operand type. it worked fine when i used it in a simple program

i was expecting that "/" to work as divide operator

0

There are 0 best solutions below