django test

This commit is contained in:
Sklvd
2023-05-12 23:02:27 +03:00
parent e094efa7aa
commit a657428482
25 changed files with 331 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
import time
class Car:
def __init__(self, model, color, volume):
self.model = model
self.color = color
self.volume = volume
def print(self):
print(self.model, self.color, self.volume)
def start(self):
self.start_time = int(time.time())
def stop(self):
self.volume -= int(time.time()) - self.start_time
obj = Car("test","test1",5)
obj.print()
obj.start()
time.sleep(2)
obj.stop()
obj.print()