The fundamental group of $\mathbb S^2$ attached with a diameter? What is the fundamental group of  $\mathbb S^2$ attached with a diameter? And what is the fundamental group of a hemisphere attached with a diameter?
I guess for the latter one, we can deformation retract it to a circle by compressing around the diameter. So the fundamental group should be $\mathbb Z$. And for the first one we can combine this result with Van Kampen's theorem, and the answer should also be $\mathbb Z$.
Am I right? And how can I prove the case for hemisphere more rigorously?

You nailed space (b). So I'll talk about space (a), which we will denote by $A$.
Space (a) is connected, arcwise connected and semi-locally simply connected. Hence, it has a universal cover. It is  natural to try to find out that universal cover. With some thinking, we get that the universal cover is the "Happy Beads" (for the lack of a good non-pornographic word) depicted below:

where the projection map is quite obvious. Now what follows is simply a mere adaptation of the proof that $\pi_1(S^1)=\mathbb{Z}$, which we outline below:
Fix a point $y$ in the universal cover and consider the map $HB: \pi_1(A, x_0) \rightarrow \mathbb{Z}$, where $x_0$ is the upper point of the sphere (which has a segment going down), which takes a class $[f]$ and sends it to $n$, where $n$ is the number of spheres (counted with "direction") between the initial point of the lift of $f$ (which is $y$) and the endpoint. This is well-defined due to the properties of lifts. $HB$ is obviously surjective. Now, if the $n$ associated with a given class is $0$, then the lifted path is a loop in the universal cover. Hence, homotopically trivial. Therefore, we have that $[f]=p_{\#}[Lift ~f]=p_{\#}0=0$. We then have that $HB$ is an isomorphism.
