def find_available_scooters(suppress_header=False): if not suppress_header: print("********* Available scooters: ********* ") parked_scooters = data_service.parked_scooters() for idx, s in enumerate(parked_scooters, start=1): print( f"#{idx}. Loc: {s.location.street} {s.location.city}, " f"{s.id} {s.model} VIN: {s.vin} with battery level {s.battery_level}%" ) print() return parked_scooters
def locate_our_scooters(): print("********* Current location of our scooters ********* ") rented_scooters = data_service.rented_scooters() parked_scooters = data_service.parked_scooters() print(f"Out with clients [{len(rented_scooters)} scooters]:") for s in rented_scooters: print( f" {s.id} {s.model} VIN: {s.vin} with battery level {s.battery_level}%" ) print() print(f"Parked [{len(parked_scooters)} scooters]:") for s in parked_scooters: print( f"Loc: {s.location.street} {s.location.city}, " f"{s.id} {s.model} VIN: {s.vin} with battery level {s.battery_level}%" )