So this one is a little bit more simple than the last one. The program chooses a number randomly and asks the user to guess the number. When the user finally gets it, it tells him or her how many tries did it take. Simple, right? Well not going t lie, I did have my troubles with some stuff of the while, and making it count the tries. But at the end I got it.

Here’s the code:

Screenshot from 2015-09-16 16:50:39

And here’s the code running:

Screenshot from 2015-09-16 16:50:26

CC BY 4.0 WSQ06 – Pick a number by drag04 is licensed under a Creative Commons Attribution 4.0 International License.