Im trying to convert this code into function but it dosent work .

```
start = int(input("Enter the start of range: "))
end = int(input("Enter the end of range: "))
sum=0
for num in range(start, end + 1):
    if num % 2 == 0:
        sum=sum+num
print(sum)

```

I tried this one but it dosent work and i dont understand the error

```
def range(start,end):
  s=0
  for num in range(start, end + 1):  
        if num % 2 == 0:
          s=s+num
        else:
            pass
    print(s)

start = int(input("Enter the start of range: "))
end = int(input("Enter the end of range: "))  
range(start,end)

```