Wash the squash, peel, remove seeds and cut into pieces about 2 inches long.
Heat the oil in a pan over medium heat. Place the sliced squash in hot oil, reduce heat to medium-low and fry each side of them until golden or a fork can easily be poked through them (add more oil if needed). Place them on paper towel to absorb extra oil.
Preheat the oven to 350 degrees F. Place one layer of fried squash on an oven proof plate. Sprinkle 1-tablespoon sugar, 1-teaspoon cinnamon powder and 4 tablespoons chopped walnuts on top of the squash. Repeat the layers.
Put it in oven and bake for 15-20 minutes. Serve the squash and walnut dessert cold or hot.