Eureka Moment Wiki

One eureka moment at the time

User Tools

Site Tools


development:python:examples_10

This is an old revision of the document!


Python examples 10

def funk(x,y):
    try:
        ret=x/y
    except ZeroDivisionError:
        ret="y ne moze biti 0!"
    except TypeError:
        ret="x i y moraju biti brojevi!"
    return ret
def vratiClan(x,y):
    try:
        ret=x[y]
    except:
        ret="Neispravni indeks!"
    return ret
def vratiClan(x,y):
    try:
        ret=x[y]
    except TypeError:
        ret="Neispravni indeks!"        
    except:
        ret="Indeks izvan raspona!"
    return ret
 
 
 
 
 
 
 
 

Discussion

Enter your comment:
T O A J Z
 
development/python/examples_10.1578552873.txt.gz · Last modified: 2020/01/09 07:54 by tplecko