Your space is a cylinder so it is homotopy equivalent to a circle (shrink $z\in (0,1)$ segments), then you may assume you know the (co)homology of the circle over $\mathbb Z$ (and $\mathbb R$). Or you may calculate cohomology using Mayer-Vietoris, taking 2 cylindric shells covering slightly more than half of your cylinder and overlapping each other on both ends you have the sequence:
$0\rightarrow H^0(X)\rightarrow H^0(U)\oplus H^0(V)\rightarrow H^0(U\cap V)\rightarrow H^1(X)\rightarrow H^1(U)\oplus H^1(V)\rightarrow\dots$
The kernel of $H^0(U)\oplus H^0(V)\rightarrow H^0(U\cap V)$ has dimension 1 (it is $\{(x,x):x\in\mathbb R\}$ for naturally chosen bases: the dual to the class of a point on $U$ and on $V$ for $H^0(U)\oplus H^0(V)$, and the dual to the class of a point on each of the connected components for $H^0(U\cap V)$), so the image has dimension 1 ($U$ and $V$ are path-connected). Therefore the kernel of the following map has dimension 1, because $U\cap V$ has 2 path-connected components so $H^0(U\cap V)$ has dimension 2. Finally, the coimage $H^0(U\cap V)/Ker$ is isomorphic to $H^1(X)$, since $H^1(U)\oplus H^1(V)=0$ because $U$ and $V$ are contractible, so $H^1(X)$ has dimension 1.
$H^0=\mathbb R$ because X is path-connected.