Computer Science is becoming more present in the curricula of the schools. Some countries already have changed their programs to offer subjects like algorithms, logic and programming languages since the beginning of early cycles of fundamental education. However, the contents are strongly related with mathematics, and for this reason, mathematics teachers need to update themselves to be able to teach the fundamentals of computer science. For this reason, we offer on this workshop an introduction to the development of computational thinking from a mathematical trick with cards. At the end of the workshop, the participants will be able to write their own code, solving a mathematical problem.