from ShipField import ShipField my_field = ShipField() my_field.set_ship_size(1) if my_field.ship_size == 1: print("OK") else: print("ERROR")