December 2014
Beginner to intermediate
240 pages
6h 54m
English
Pick a number from 1 to 10. Now have your opponent try to guess that number. Don’t give any hints; just say whether the guess is right or wrong. Imagine that your opponent is the computer, and it’s guessing at total random. That’s the app we’re going to build.
The interface is really simple, as in Figure 4.19. You can elaborate on the design, but for now, let’s just get to the good stuff: the local variable. Use a button to get the computer to make a guess. Two labels will tell the user what the latest computer guess was and whether it was correct.
Figure 4.19 The Random Guess app in the Designer.
Figure 4.20 shows ...
Read now
Unlock full access