It's confusing to calculate Euler characteristic of this surface This pic below is an exploded view of a cone.



I'm trying to calculate the Euler characteristic of the surface made from the fragment $M$, i.e.,



At first I thought the Euler characteristic is 0, but the one who made this question says it is actually 1.

And this is actually a part of an exercise to find the total geodesic curvature of $\partial M$. I tried to figure it out using the Gauss-Bonnet theorem.



I'm sorry that the question is not clear.
$M$ is the region between top circle of cone and closed geodesic meeting the top circle of cone at one point.
If I'm reading that picture correctly, the Euler characteristic shouldn't exist.

The subset $M$ of the cone looks like it started as a topological disk facing left, and is curving to the right to connect back with itself, and will become a topological cylinder (a sphere with 2 disks removed).

A disk has $\chi=1$ , and a cylinder has $\chi=0$ . The surface $M$ is between those.

Nevertheless, Euler's formula can be applied to a polygonalization of $M$, formed as a square pyramid with 2 opposite triangles removed; the peak of the pyramid is the singular point.

The pyramid has $5$ vertices, $8$ edges, and $3$ faces. Thus $\chi=5-8+3=0$.
Gauss- Bonnet theorem  establishes the connection/identity between isometric (left hand side of equation) and Euler topological constant  (right hand side ). In short

$ \int K dA + \int \kappa_{g} \,ds= 2 \pi \chi$

where for compact surfaces the first term is total/integral curvature or solid angle in steridians, second term is  rotation in tangent plane measured in radians which together elegantly  sum up to Euler charactristic $2 \pi \chi.$ Sudden jumps with geodesics can be accommodated/interpreted as external angles sum $\Sigma \psi_{i}$ around the contour for the line integral.

For a Torus with cancelling geodesic sections:

$0+ 0=2 \pi \chi \rightarrow \, \chi=0 \tag1$

For a hemisphere bounded by an equator:

$2 \pi +0 = 2 \pi \chi \rightarrow \, \chi=1 \tag2 $

For a closed convex loop on a developable surface (Gauss curvature $K=0\,$ for cones, cylinders/developable helicoids) for either continuous ( like a circle in a flat plane or non-intersecting continuous loop on a curved surface) curves or discontinuous sloped curves (segment of circle $M$ like the one you sketched of developed cone patch):

$0+ 2 \pi=2 \pi \chi \rightarrow \, \chi=1 \tag3 $

The matter is thus established by isometry/topological considerations.

EDIT1:

I am in agreement with the question setter. I would suppose he wanted the student to recognize a group of such isometric/homeomorphic equivalents.