Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/exercises/en/21_complete-activity.txt
blob: 325275af3ddfd43377d9bf1faed6a485b9948f7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Exercise 20

For this final exercise, you must create a new Sugar activity from scratch. You
have two options of activities to create:
 A. An ‘odd one out’ game. It should display four buttons on the screen, each
    with a conjugation of a verb as its text. The four conjugations should be
    different, and one should be incorrect. The user must click on the button
    with the incorrect conjugation. If they do, their score is increased and
    another set of four conjugations is displayed. If they click on the wrong
    button, their score is not incremented and the conjugations do not change.
    The user must click the odd one out to proceed.
    The user’s score should be displayed in a label in the toolbar (ask if you
    need help with this, or look at the code in PascalTriangle which does a
    similar thing by putting a GtkScale in its toolbar).
 B. Similar to the above game, but using mathematical equalities instead of
    verb conjugations. The game should present the user with four equalities
    (e.g. “5 × 6 + 3 = 33”, “(1 + 4) × 2 = 10”, etc.), one of which should be
    incorrect. The user must pick the incorrect one to proceed.

Once you’ve created the activity, tested it in emulation and tested it on a
physical XO, you should get someone else to review all of your code and see if
they can find any problems with it. Code review like this is always helpful, as
every programmer makes mistakes (no matter how experienced they are) and a
fresh pair of eyes can spot them. Ideally, your code should be reviewed by
someone who wrote the other type of activity to you, so they have to rely on
comments in your code to work out how the code functions. Remember to comment
your code well!