Wash the pumpkin, remove the seeds and cut the pulp into cubes. Heat the butter in the pan and fry the pumpkin cubes. Depending on the size of the cubes, it takes about 10-15 minutes for the pumpkin to cook through.
Season with salt and pepper to taste. Turn off the stove and spread the grated cheese on the pumpkin. Let the lid on the pan and melt the cheese in the residual heat.