0

I need help with this problem __init__() missing 2 required positional arguments: 'vlrmin' and 'vlrtotal'

class parqueadero: def __init__(self,placa,Estadia,TipoVehiculo,vlrmin,vlrtotal): self.placa = placa self.Estadia = Estadia self.TipoVehiculo = TipoVehiculo self.vlrmin = vlrmin self.vlrtotal = vlrtotal def getPlaca(self): return self.placa def getEstadia(self): return self.Estadia def getTipoVehiculo(self): return self.TipoVehiculo if self.TipoVehiculo == int: if TipoVehiculo == 1: self.vlrmin=100 elif TipoVehiculo == 2: self.vlrmin = 120 elif TipoVehiculo == 3: self.vlrmin = 70 def getvlrmin(self): return self.vlrmin def getvlrtotal(self): return self.vlrtotal def mostrarparqueadero(self): print("\nPlaca: " +self.getPlaca()+"\nTiempo de estadia: "+str(self.getEstadia()) + "\nTipo de vehiculo: "+str(self.getTipoVehiculo())+"\nValor a pagar: " + str( self.getvlrtotal()*(self.getvlrmin() * self.getEstadia()))) placa = input("Favor ingresar placa: ") Estadia = int(input("Favor ingresar el tiempo de estadia: ")) TipoVehiculo =int(input("\n1. Automovil"+"\n2. Camioneta"+"\n3. Moto"+ "\nFavor ingresar el tipo de vehiculo: ")) e = parqueadero(placa,Estadia,TipoVehiculo) e.mostrarparqueadero()

26th Oct 2021, 11:57 PM
Marlon Pinilla
Marlon Pinilla - avatar
1 Odpowiedź
+ 1
parqueadero() requires five arguments, but you only provide three in your function call.
27th Oct 2021, 12:05 AM
Simon Sauter
Simon Sauter - avatar