class Vehicle(object):
def __init__(self,s,v,t,a):
self.speed=s
self.size=v
self.time=t
self.acceleration=a
def jiasuwan(self):
self.jiasu=self.speed+self.acceleration*self.time
return (f'加速完的初速度是:{self.jiasu}')
def jiansuwan(self):
self.jiansu=self.speed-self.acceleration*self.time
return (f'减速完的加速度是:{self.jiansu}')
def show(self):
print(f'初速度:{self.speed} 加速度:{self.acceleration} 体积:{self.size}')
print(f'设置的初速度为:{self.speed}')
s=eval(input())
v=eval(input())
t=eval(input())
a=eval(input())
x=Vehicle(s,v,t,a)
x.show()
x.jiasuwan()
x.jiansuwan()