what's the difference between the following codes

(specifically, what the difference of == int or float: and == int or type(num) ==float:)

```
(A)def distance_from_zero(num):
if type(num) == int or float:
return abs(num)
else:
return "Nope"
```

```
(B)def distance_from_zero(num):
if type(num) == int or type(num) ==float:
return abs(num)
else:
return "Nope"
```