---
# System prepended metadata

title: Пример вставки кода на python

---

# Пример вставки кода на python

~~~python
class vec:  
    MAX=100
    MIN=0

    @classmethod
    def validate(cls,arg):
        return cls.MIN <= arg < cls.MAX

    def __init__(self,x,y):
        self.x=self.y=0
        if self.validate(x) and self.validate(y):
            self.x=x
            self.y=y

    @staticmethod
    def norm(x,y):
        return x*x+y*y

    def get_coords(self):
        return(self.x,self.y)

print(vec.validate(5))
print (vec.norm(2,5))
~~~
