·Pick a number· #WSQ06

I had the task to write a program which could use a random number between the 1 and 100 and let the user play a game trying to guess that number. First of all, I had to look for how to print a random number. Honestly I didn’t save the pages where I found the information but if you type it on Google you won’t have any problem finding the libraries and the commands to print a random number.

Then I used a loop, so the user could keep guessing the number that the program had selected as default. Also I used a counter which would tell the user how many times he had tried guessing the number.

Here is a screenshot of how I wrote the program. Also you can find my code on GitHub. Link.

Captura de pantalla 2016-01-22 a las 18.39.31

Captura de pantalla 2016-01-29 a las 12.24.35

You can see a video of my program working on ScreenCast. Link.

Captura de pantalla 2016-01-29 a las 12.25.18

Alex H.

24294566811_7004231734_k
Another Sunrise over the Alps by Rogg4n Link on Flickr: https://www.flickr.com/photos/128294308@N05/24294566811/in/explore-2016-01-14/

CC BY-SA 4.0 ·Pick a number· #WSQ06 by alexhfoo is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.