We learn what an algorithm is by defining one that simulates the draw of the FIFA World Cup group stage. Unlike the FIFA draw that uses balls, in this case we use the computer to generate random numbers. The code was developed in PHP.
We learn what an algorithm is by defining one that simulates the draw of the FIFA World Cup group stage. Unlike the FIFA draw that uses balls, in this case we use the computer to generate random numbers. The code was developed in PHP.
The draw of the FIFA World Cup group stage is an event that attracts all football fans around the world because on that day we finally know who plays against who and therefore we can determine what teams have higher chances to advance to the next phase. Interestingly, forecasting the result of the draw is impossible because there are multiple combinations; however, these combinations have something in common… its origin is an algorithm! Because of this, here, instead of predicting the outcome of the draw, we will seek to understand what an algorithm is and to achieve this we will develop the one used by FIFA to set the group stage of the World Cup. As an example, we will consider the 2018 FIFA World Cup, and then, using the PHP programming language, we will test its validity. If you want to download the code on your computer, you can do so from my repository @Github. To check how this code works, click the following button and get one of the many ways in which the group stage of the 2018 FIFA World Cup would have been:
Views: 1 Github,Sports
Notifications
Receive the new articles in your email