forked from hedyorg/hedy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathar.yaml
1173 lines (1146 loc) · 68.7 KB
/
ar.yaml
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
title: Hedy documentation
sections:
- title: "Introduction"
key: "intro"
subsections:
- title: "What's Hedy?"
text: |
Hedy is a textual programming language, specifically developed for (pre-)teens (10 to 15 years old).
In contrast to programming languages for kids, like Scratch, Hedy doesn't use code blocks but textual code.
So with Hedy you'll learn how to type code like the real programmers do, but in small steps with playful exercises.
This way Hedy can function as a stepping stone to real programming languages like Python in an accessible and mostly fun way!
If you want to know more, you can watch this <a href="https://www.youtube.com/watch?v=EdqT313rM40&t=2s" target="_blank">video</a> about the development of Hedy as a programming language.
- title: "Target audience"
text: |
Hedy is developed with middle school and junior high school students in mind (ages 10 - 15).
It's important for the students to be able to read well. We recommend not to start with Hedy before the students have achieved at least a 3rd grade reading level.
Students (and teachers!) don't need any programming experience before starting with Hedy.
- title: "How does Hedy work?"
text: |
Hedy is divided into levels, in which new commands are taught. Each level contains a variety of adventures to practice the newly learned commands.
As a teacher, you get to decide which adventures are available for your students. Will they be making a restaurant, a calculator or a haunted house this level? Within each level, the adventures are arranged from easiest to hardest.
So your students keep getting challenged. The adventures can be done by the students individually, or you can use them in a classical instruction.
The adventures also include a code example, to make sure the less digitally informed teachers are able to use Hedy too!
Of course Hedy also caters to the creative teachers that love to make their own lessonplans and adventures!
After programming all the adventures of a certain level, your students can test their knowledge in the quiz.
You can track your students' work and their progress on the class page.
- title: "Devices"
text: |
Hedy is webbased, which means it works on any device with a browser (Google Chrome, Firefox, Edge etc), so laptops, chromebooks, tablets and even smartphones are suitable to use Hedy.
There's no need to download anything before working with Hedy, just go to the website and you're all set!
- title: "The Hedy Community"
text: |
All Hedy teachers, programmers and other fans are welcome to join our [Discord server](https://discord.gg/8yY7dEme9r). This is the ideal place to chat about Hedy: we have channels where you can show your cool projects and lessons, channels to report bugs, and channels to chat with other teachers and with the Hedy team.
[Here](https://www.youtube.com/watch?v=Lyz_Lnd-_aI) you can find a video on how to join the dicord community.
- title: "Tutorial"
key: "tutorial"
subsections:
- title: "Tutorial"
text: |
Do you want to follow the tutorial (again)? Click [here](https://hedycode.com/tutorial)
- title: "Teaching preparations"
key: "preparations"
subsections:
- title: "Creating a Class"
text: |
As a teacher, you can create a class for your students. In this class you can see the students' accounts and their programs and you could monitor their progress.
This [video](https://www.youtube.com/watch?v=Y3RTIWftJQg) shows you how to quickly create a class in Hedy.
- title: "Customize your Class"
text: |
You can also customize your class and choose which adventures are available for them. This way your students won't be overwhelmed by the amount of adventures and levels, and they can specifically focus on the adventures you'd like them to practice with.
This [video](https://www.youtube.com/watch?v=qva9gXBoUwY&t=10s) shows you how to customize your class.
- title: "Student Accounts"
text: |
There are 2 ways to let your students join your class: You can create accounts for them, or they could create their own accounts.
**You create accounts for your students**
The easiest way to add students to your class is by creating an account for them. This can be done by clicking the 'create student accounts' button and filling in the usernames and passwords for them.
The students can login with the username and password that you chose. Afterwards, they can change their username or password if they'd like and they'll still remain in your class.
This [video](https://www.youtube.com/watch?v=eEQvik-Ce5M) shows how to add students to your class in the quickest and easiest way.
**Students make their own accounts**
Your students can also go to the Hedy website and create their own accounts, just like you did. To get them into your class, they simply have to click the invite link.
You can find the invite link on the class page and send it to your students. Mind that your students have to be logged in to Hedy when they click the link, in order to make it work smoothly.
You can also manually invite a student to your class with the button 'Invite by username'.
- title: "Setting preferred language"
text: |
When students create profiles they are supposed to choose a 'preferred language'. Hedy will always be loaded in this selected language.
Changing this language can always be done later on by navigating to 'My account' and 'My personal settings' again.
From December 2021, setting a preferred language is obligatory for each Hedy account.
When your account or your students' accounts have been created earlier than this date, you will receive a message that a preferred language is missing.
Don't worry! Navigate to 'My profile' and set a language in your profile settings.
Until you set a language Hedy will be shown in your browser language and, when this language is not supported, in English.
**For non-English speakers**
Not only can you change the language of the adventures to your own language. You can also choose which language the keywords (for example 'print' or 'ask') should be in.
This way you can teach your students to code with English keywords, but you can also let them program in their own language. For example, Dutch students can use the command 'vraag' instead of 'ask'.
**Video**
This [video](https://www.youtube.com/watch?v=QrVZETj4oLM) show you how to set a preferred language and change the keywords to you preferred language as well.
- title: "Storing programs"
text: |
When you are logged in, you'll see My programs next to your profile icon.
This option exists for your students too. In My programs you can find all the programs that you've worked on.
By default, programs will be saved to 'My programs' when you run the code, and every 10 seconds, under their default name
and their level (for example: Story 5). If you want to store a program under a new name, just type the new name in the name bar.
Currently, only one program can be saved per level, per tab.
You (and your students) can also share programs using the share button next to program names.
These programs will be posted on our <a href="https://hedy.org/explore" target="_blank">explore page</a>, for everybody to see and use.
If you want to unshare your program, go to 'My programs' and click 'Unshare'.
The paper plane icon can be used to hand in programs to the teacher of a class. Programs that have been handed is will no longer be editable.
- title: "Teaching with Hedy"
key: "teaching"
subsections:
- title: "Teaching with Hedy"
text: |
Hedy contains a lot of different levels that each teach a different new skill. We recommend to teach one level per lesson.
This gives your students the time to fully grasp a new command or concept and practice with it, before moving on to the next level.
We use this structure in our lessons: Introduction, New concepts and commands, let's get to work, puzzels and quizzes.
- title: "Slides"
text: |
**COMING SOON** Here you'll soon find slides to use in your lessons.
- title: "Introduction"
text: |
You can start your lessons by activating your students' prior knowledge: What do they already know about the subject, what did they learn in the previous lesson and which mistakes did they make that they've now learned from?
This way all the previously learned commands and frequently made mistakes are fresh in your students' memories, when you start introducing the new lesson.
- title: "Introduction of new concepts and commands"
text: |
The new concepts and commands can be very hard for some students to fully understand.
That's why it's of importance to model the proper use of the new commands to your students.
Especially in the lower levels, where some students have no experience whith programming at all, it can be hard for them to understand the new abstract concepts.
Showing a lot of examples makes an abstract concept (for instance: 'What is a variable?') more recognizable and easier to understand ('Look, the variable pet changed into dog').
- title: "Let's get to work"
text: |
Each level contains different adventures that you can find in the pink tabs. The first pink tab explains the new commands in this level.
The following tabs are adventures that the students can try out and make their own.
The adventures are arranged from easiest to hardest, so we recommend to start on the left and your your way to the right.
The last tab 'what's next' gives a little teaser of what you'll learn in the next level. Of course, you can select the adventures you want your students to do for each level.
They don't always have to make every adventure. Every adventure contains an example code, that the students can try out with the green button.
The example code gets copied to the workfield, where the students can try out the code and adjust it to make it their own.
Stimulate your students to turn the example codes into their own projects by adding their own ideas and making their own variation of the adventure.
- title: "Quizzes and puzzels"
text: |
To test whether your students have picked up all the new info in the level, you can let them make the quiz.
The quiz contains 10 multiple choice questions about the new concepts and command to that level.
Not every level has a quiz yet, as we are still building the quizzes.
Some levels also contain puzzels. Puzzels show the students a couple of line of code that the students have to put in the right order.
This [video](https://www.youtube.com/watch?v=lNh5EdZVUwc) shows the quizzes and puzzels.
- title: "Evaluation"
text: |
Round up your lesson by having a brief evaluation. What did the students learn? Which hardships did they come across?
How did they learn from their mistakes? And of course: What did they create?
Students are often very proud of their own creations, so it's nice to save a little time and gove your students the opportunity to show their work to their classmates.
- title: "Extra Hedy features"
key: "features"
subsections:
- title: "Teacher Statistics"
text: |
This [video](https://www.youtube.com/watch?v=iwHVG4NRKI4&t=5s) shows you more information on how to use the teacher statistics in your class.
- title: "Make your own adventure"
text: |
It is also possible for teachers to create your own adventure. [This video](https://www.youtube.com/watch?v=A0zbXpxX4q4) shows you how to create your own adventure as a teacher and add it to your class(es).
- title: "Explore page"
text: |
On the [explore](https://hedycode.com/explore) page you can view the work of other Hedy users. You can try out their programs and use them as inspiration to create something cool yourself.
You can also add a program you've made to the explore page yourself by clicking 'Save and share code' in the coding screen or go to My Programs and click 'Share'.
Don't want to share your work anymore? Simply go to 'My Programs' and click 'Unshare'.
If you want more information about the explore page, check out this [video](https://www.youtube.com/watch?v=26boFjqvS5Q).
- title: "My achievements"
text: |
If you click on your username in the topright corner of your screen, you can go to [My achievements](https://hedycode.com/my-achievements). On this page you achievements are collected. Your students have such a page as well.
When you hover over the badge with your mouse, you'll see how to earn the badge. There are hidden badges too, of which you'll have to find out yourself how to earn them.
If you want more information on the achievements, check out this [video](https://www.youtube.com/watch?v=-FjmKejukCs).
- title: "High Scores"
text: |
On [this page](https://hedycode.com/highscores) you can see the high scores of all Hedy users.
In this [video](https://www.youtube.com/watch?v=IqTiUkBVTo8) you can learn some more about the high scores.
- title: "Debugger"
text: |
Is your (student's) code not working? There must be a bug (coding mistake) in it! You can use the debugger to find the mistake.
The debugger is the ladybig button in your coding screen. If you press it, you can run your code line by line to find your mistake.
Have you found the mistake? Press the red stop button and the debugger will shut off.
- title: "Read aloud"
text: |
Do you want the output of your program to be read aloud? Then you can use the read aloud function that is found under the 'run code' button in your coding screen.
- title: "Programmers mode"
text: |
Distracted by all the adventures, or do you want to make a long program? Then check out the 'Programmers Mode' switch at the bottom of your coding screen.
Programmers mode allows you and your students to use a bigger coding screen.
- title: "Cheat sheets"
text: |
In every level there is a button with this emoji 🤔. You and your students can find the "cheat sheets" there. On this cheat sheet, you can find all the commands that are usable in this level in their correct form.
So if you've forgotten how a command works, simply take a peek at the cheat sheet!
- title: "Other useful features"
text: |
This [video](https://www.youtube.com/watch?v=c4MntPPgl1Y) shows you even more features of Hedy, like the cheatsheets and the keyboard switcher.
- title: "Common mistakes"
key: "common_mistakes"
intro: |
You can learn from your mistakes, especially in coding!
Making mistakes is unavoidable, and a great opportunity to learn, but for teachers it can be a challenge to find the correct fix for a mistake!
Especially as the codes get longer and longer as the levels progress. That's why we've made a list with frequently made mistakes in each level, and their solutions.
levels:
- level: '1'
sections:
- title: "Students forget to type commandos"
example:
error_text: |
For example they type a sentence without using print.
error_code: |
Hedy can't print this
solution_text: |
Teach your students to always start a line of code with a command.
solution_code: |
print Hedy can print this!
- title: "Students use capitals when typing commands"
example:
error_text: |
Commands won't work if they are in capitals.
error_code: |
Ask Why does my code fail?
Print Because I'm using capitals.
solution_text: |
Remove the capitals.
solution_code: |
ask Why does my code work now?
print Because I removed the capitals!
- title: "Students use echo without ask"
example:
error_text: |
Echo is made to repeat an answer after an ask command. Without ask echo won't do anything.
error_code: |
echo Your name is
solution_text: |
Add an ask command to make it work.
solution_code: |
ask What's your name?
echo Your name is
- title: "Students want their echo word (variable) to be in the middle of a sentence"
example:
error_text: |
And they are right! That's why they will learn to use proper variables in the next level.
error_code: |
ask Which programming language is the most fun?
echo is the best!
solution_text: |
In level 1 we have to keep it at this:
solution_code: |
ask Which programming language is the most fun?
echo The best is...
- title: "Turtle: Students let the turtle walk off of the screen"
example:
error_text: |
Often students love to try out big numbers when using the turtle, which causes the arrow to walk off the screen.
error_code: |
forward 300
turn 90
solution_text: |
In the example. students tend to think that the turn command doesn't work. Eventhough is does work, but you can't see it happening off screen. Use smaller numbers to prevent this from happening.
solution_code: |
forward 100
turn 90
- title: "Turtle: Students use the command backward, but that doesn't exist"
example:
error_text: |
Backward is not a command.
error_code: |
backward 100
solution_text: |
To make the turtle go backwards, you use the forward command and a negative number. For example:
solution_code: |
forward -100
- level: '2'
sections:
- title: "Students make typos in their commands"
example:
error_text: |
Hedy can't recognize a command with a typo.
error_code: |
prinnt Don't make typos!
solution_text: |
Teach your students to read the error messages. This way they can find out themselves what went wrong.
solution_code: |
print Don't make typos!
- title: "Students forget that the ask command has changed"
example:
error_text: |
In this level students learn about variables. The ask command requires a variable as well, but students forget this.
error_code: |
ask what would you like to eat?
solution_text: |
In this level you have to tell Hedy where to save your answer, so it can be used later on. This is called a variable.
solution_code: |
order is ask What would you like to eat?
- title: "Students try to use the echo command "
example:
error_text: |
For some students it might be frustrating to learn that the echo command doesn't work anymore. That's why it's very important to explain the advantages of using variables. For example you can use multiple variables in a code, and you can put them anywhere you like in a sentence!
error_code: |
answer is ask Why doesn't echo work anymore?!
echo
solution_text: |
Use a varible instead.
solution_code: |
answer is ask Why doens't echo work anymore?!
print answer
- title: "Students use a variable name or as a normal word"
example:
error_text: |
In the example below the word 'name' is used a a variable, but also as a normal text. The output of this code will be 'Hi my Hedy is Hedy'.
error_code: |
name is Hedy
print Hi my name is name
solution_text: |
So don't use a word you want to use in the text as a variable name. In level 4 this is solved with quotation marks.
solution_code: |
name is Hedy
print Hi I'm name
- title: "Students use long variable names containing two words."
example:
error_text: |
A variable should be named with one word. You could use an underscore to connect two words. That counts as one.
error_code: |
chosen door is ask Which door do you pick?
solution_text: |
Add an underscore.
solution_code: |
chosen_door is ask which door do you pick?
- title: "Students might use two different names for the same variable"
example:
error_text: |
In this example the student has used 'horse' and 'name' for the same variables.
error_code: |
horse is ask What is your horse called?
print Your horse is called name
solution_text: |
Always check wheter the variable has the same name throughout the code. Slight differences can be hard to spot (for example plurals) but they will interfere with the code.
solution_code: |
name is ask What is your horse called?
print Your horse is called name
- level: '3'
sections:
- title: "Students try to print whole lists"
example:
error_text: |
A list can't be printed. You can only print one item from the list with at random.
error_code: |
groceries is apples, milk, chocolate
print groceries
solution_text: |
To print a list of all the groceries, you simply need to put them after a print command. Else you can use the list to print one item with at random.
solution_code: |
print apples, milk, chocolate
or
groceries is apples, milk, chocolate
print groceries at random
- title: "Students use the name of a variable or list as regular text"
example:
error_text: |
This problem probably occured in level 2 as well. Now it can happen with lists too.
error_code: |
name is Hedy
print Hi my name is name
or
animal is rhino, bee, swan
print The best animal is... animal at random
solution_text: |
Don't use the names of variables or lists in regular text to print. In level 4 this problem is solves with quotation marks.
solution_code: |
name is Hedy
print Hi I'm name
or
animals is rhino, bee, swan
print The best animal is... animals at random
- title: "Students forget at in at random"
example:
error_text: |
Like in the example
error_code: |
birds is sparrow, seagull, robin
print birds random
solution_text: |
This problem is solved by adding the word at.
solution_code: |
birds is sparrow, seagull, robin
print birds at random
- title: "Students forget to use the print command when also using the at random command"
example:
error_text: |
Or they will sometimes put at random at the beginning of the line.
error_code: |
fruit is apple, cherry, banana
fruit at random
solution_text: |
Emphasize to your students that you always need a print to print text.
solution_code: |
fruit is apple, cherry, banana
print fruit at random
- title: "Students forget to use commas in their lists"
example:
error_text: |
In a list items are seperated with a comma.
error_code: |
pizzas is funghi tonno quattro stagioni
print pizzas at random
solution_text: |
After each item on your list, there should be a comma
solution_code: |
pizzas is funghi, tonno, quattro stagioni
print pizzas at random
- title: "Students try to use at random without a list"
example:
error_text: |
For example
error_code: |
clubs is Manchester United
print clubs at random
solution_text: |
Hedy can't print anything at random, because there is no list to choose from.
solution_code: |
clubs is Manchester United, Bayrn Munchen, FC Barcelona
print clubs at random
- title: "Students try to use add/remove without a list "
example:
error_text: |
In the example below 'names' is not a list, but a variable. You cannot add anything to it.
error_code: |
names is Jake
your_name is ask Who are you?
add your_name to names
print names at random
solution_text: |
There has to be a list first, so you have to add a second name to turn names into a list, for example Amy. If you don't want amy on your list, you can use remove to remove it after.
solution_code: |
names is Jake, Amy
your_name is ask Who are you?
add your_name to names
print names at random
- title: "Students forget to use to/from in add/remove"
example:
error_text: |
Without to/from the add/remove command won't work.
error_code: |
adventures is story, parrot, dice
choice is Which adventure do you like best?
add choice
remove dice
print I love adventures at random
solution_text: |
Hedy has to know which list the item should be added to/removed from.
solution_code: |
adventures is story, parrot, dice
choice is Which adventure do you like best?
add choice to adventures
remove dice from adventures
print I love adventures at random
- level: '4'
sections:
- title: "Students forget to use quotation marks on both sides of the text"
example:
error_text: |
In this level print and ask need a set of quotation marks. One before of the text and one after.
error_code: |
print Hello
mood is ask 'How are you?
solution_text: |
Add the correct quotation marks.
solution_code: |
print 'Hello'
mood is ask 'How are you?'
- title: "Students use the wrong quotation marks"
example:
error_text: |
It is important to start your lesson by checking if the students know how to type a quotation mark properly. Else they might use the "double quotes" or the skewed one `.
error_code: |
print `Welcome to the restaurant`
food is ask "What would you like to order?"
solution_text: |
These are the correct quotation marks:
solution_code: |
print 'Welcome to the restaurant'
food is ask 'What would you like to order?'
- title: "Students use an apostrophe in their text"
example:
error_text: |
From this level on apostrophes are not allowed. They are often used in English when thyping contractions like you're, don't or what's.
error_code: |
print 'You're not allowed to type this'
solution_text: |
You can choose to use the wrong grammar and just leave the apostrophe out. Or you could use the ` as an apostrophe.
solution_code: |
print 'Youre allowed to type this'
print 'And you`re able to do this'
- level: '5'
sections:
- title: "Students forget to use print in an if command"
example:
error_text: |
After students use if or else they forget to use a second command like print or ask.
error_code: |
if name is Hedy 'Great!'
else 'Hedy is better!'
solution_text: |
Add the print command to fix it.
solution_code: |
if name is Hedy print 'Great!'
else print 'Hedy is better!'
- title: "Students might use two different names for the same variable"
example:
error_text: |
In this example the student has used 'horse' and 'name' for the same variables.
error_code: |
horse is ask 'What is your horse called?'
if name is Bonfire print 'cool'
else print 'less cool!'
solution_text: |
Always check wheter the variable has the same name throughout the code. Slight differences can be hard to spot (for example plurals) but they will interfere with the code.
solution_code: |
horse is ask 'What is your horse called'
if horse is Bonfire print 'cool!'
else print 'less cool!'
- title: "Students still forget the quotes on both sides"
example:
error_text: |
Codes using the `if` commando can get very long and students tend to forget to use quotes.
error_code: |
if name is Hedy print fun
else print 'meh!
solution_text: |
Always use 2 quotes in a print command.
solution_code: |
if name is Hedy print 'fun'
else print 'meh!'
- title: "Students use quotes around variable names"
example:
error_text: |
In this level there are no quotes around variable names.
error_code: |
if 'name' is 'Hedy' print 'fun'
else print 'meh!'
solution_text: |
Remove the quotes to get the code to work.
solution_code: |
if name is Hedy print 'fun'
else print 'meh!
- title: "Students use long variable names containing two words"
example:
error_text: |
A variable should be named with one word. You could use an underscore to connect two words. That counts as one.
error_code: |
chosen door is ask 'Which door do you pick?'
solution_text: |
Add an underscore.
solution_code: |
chosen_door is ask 'which door do you pick?'
- title: "Students want multiple answers to be correct"
example:
error_text: |
For example this student Hedy to tell all his friends that they are funny, but other classmates would be told that they are not.
error_code: |
if name is Jesse, David, Souf print 'You are funny' else print 'You are not funny'
solution_text: |
You could use the `in` command for that. It is explained in a higher level, but it does already work in level 5.
Another solution is to use multiple if commands and no else command. The disadvantage is that it won't tell the other classmates that they are not funny.
solution_code: |
friends is Jesse, David, Souf
name is ask 'Who are you?'
if name in friends print 'You are funny'
else print 'You are not funny'
or
name is ask 'Who are you?'
if naam is Jesse print 'You are funny'
if naam is David print 'You are funny'
if naam is Souf print 'You are funny'
- title: "The students make the variable name the same as the value in the if statement"
example:
error_text: |
In the example below the password is 'password'. This will result in it always being correct.
error_code: |
password is ask 'What is the password?'
if password is password print 'Access granted'
else print 'Acces denied!'
solution_text: |
Pick a different name for your variable.
solution_code: |
secret_password is ask 'What is the password'
if secret_password is password print 'Access granted!'
else print 'Access denied!'
- level: '6'
sections:
- title: "Students struggle with quotation marks"
example:
error_text: |
Some students struggle with adding quotattion marks or not. If you add quotation marks, the output screen will literally show '5+5'.
error_code: |
print '5 + 5'
solution_text: |
In this code the output screen will print '10'.
solution_code: |
print 5 + 5
- title: "Students struggle with the concept of doing maths with a variable"
example:
error_text: |
Some students will find it hard to do maths with variables. Try to show them very simple examples, like:
error_code: |
age = ask 'How old are you?'
print 'Next year you will be ' age + 1
solution_text: |
Or take it a step further like this.
solution_code: |
price = 0
print 'Welcome to our burger restaurant'
burger = ask 'Would you like a burger?'
if burger = yes price = price + 10
drink = ask 'Would you like a drink?'
if drink = yes price = price + 4
print 'That will be ' price ' euros please'
- level: '7'
sections:
- title: "Students forget one of the word of the repeat command, or they forget the print command"
example:
error_text: |
Make sure that the students know to use both the full repeat command and the print command.
error_code: |
repeat 3 times 'For he`s a jolly good fellow'
repeat 3 print 'Which nobody can deny!'
solution_text: |
This is the correct code:
solution_code: |
repeat 3 times print 'For he`s a jolly good fellow'
repeat 3 times print 'Which nobody can deny!'
- title: "Students try to repeat multiple lines"
example:
error_text: |
In this level you can only repeat one line of code multiple times. In this code the student wanted to print 3 different drinks, but it won't work. It will ask the question 3 times and only print the last answer.
error_code: |
repeat 3 times drink = ask 'What would you like to drink?'
print drink
solution_text: |
You should go to the next level to be able to repeat multiple lines. So on this level you'll have to print everything seperately.
solution_code: |
drink = ask 'What would you like to drink?'
print drink
drink = ask 'What would you like to drink?'
print drink
drink = ask 'What would you like to drink?'
print drink
- title: "Students make programs that take too long to run"
example:
error_text: |
In this level it's very easy to make long codes. The students aren't allowed to make programs that take to long to load (to save our servers).
error_code: |
repeat 100 times print 'How many times can I repeat this?'
solution_text: |
Make sure the codes aren't too long
solution_code: |
repeat 20 times print 'This is enough'
- level: '8'
sections:
- title: "Students use the indentation wrong"
example:
error_text: |
Indentation is a new concept in this level, that is hard to use for some students. Make sure they practise some simple codes before making a whole program with it.
error_code: |
repeat 3 times
print 'hello'
solution_text: |
This is the correct code:
solution_code: |
repeat 3 times
print 'hello'
- title: "Students only repeat 1 line when they wanted to repeat multiple lines"
example:
error_text: |
For instance, in the code below the student wanted to take the drinks order of 3 people. But insted the program asked 3 times, but only wrote down one order.
error_code: |
repeat 3 times
drink = ask 'What would you like to drink?'
print drink
solution_text: |
In the correct code the third line starts with indentation too. This way it belongs to the repeat block and therefore it will be repeated 3 times.
Showing your students these differences can help them understand why we need indentation to make our programs work.
solution_code: |
repeat 3 times
drink = ask 'What would you like to drink?'
print drink
- title: "Students want to nest if statements, or put if statements inside a loop"
example:
error_text: |
In this level students aren't allowed yet to put if statements inside other if statements or inside repeat loops.
In the next level this is allowed.
error_code: |
birthday = ask 'Is it you birthday?'
if birthday = yes
repeat 3 times
print 'Hip Hip Hooray!'
solution_text: |
This is the correct code for this level:
solution_code: |
birthday = ask 'Is it you birthday?'
if birthday = yes
print 'Hip Hip Hooray!'
print 'Hip Hip Hooray!'
print 'Hip Hip Hooray!'
- title: "Students make programs that take too long to run"
example:
error_text: |
In this level it's very easy to make long codes. The students aren't allowed to make programs that take to long to load (to save our servers).
error_code: |
repeat 100 times
print 'How many times can I repeat this?'
solution_text: |
Make sure the codes aren't too long
solution_code: |
repeat 20 times
print 'This is enough'
- title: "Students use the if command to check if the variable value is the same as the variable name"
example:
error_text: |
We have seen this mistake by some of our students. They make a password for their computer, but they make the password 'password'.
In line 2 the computer is asked to check wheter the variable password is the same as the variable password, so itself. Which means the answer is alway yes.
So with this code the answer will always be 'You can come in' no matter what the player fills in.
error_code: |
password is ask 'What is the password?'
if password is password
print 'You can come in'
else
print 'You are not allowed'
solution_text: |
You can fix this mistake by adding quotation marks. This way the computer knows that the second password in `if password is 'password'` is a string value (so normal text) and not the variable name.
solution_code: |
password is ask 'What is the password?'
if password is 'password'
print 'You can come in'
else
print 'You are not allowed'
- level: '9'
sections:
- title: "Students make mistakes with indentation"
example:
error_text: |
The hardest part about this level is getting the indentation right. Students love nesting if statements, sometimes even inside other nested if statements. Keeping track of indentation can get pretty tough.
error_code: |
print 'Robin is walking downtown'
location = ask 'Is Robin going into a shop, or does she go home?'
if location is shop
print 'She enters the shop.'
print 'Robin sees an interesting looking book'
book = ask 'Does Robin buy the book?'
if book is yes
print 'Robin buys the book and goes home'
else
print 'Robin leaves the shop and goes home'
else
print 'Robin goes home'
solution_text: |
This is the correct code. Try to keep track of all the different constructions when putting if statements inside other if statements.
solution_code: |
print 'Robin is walking downtown'
location = ask 'Is Robin going into a shop, or does she go home?'
if location is shop
print 'She enters the shop.'
print 'Robin sees an interesting looking book'
book = ask 'Does Robin buy the book?'
if book is yes
print 'Robin buys the book and goes home'
else
print 'Robin leaves the shop and goes home'
else
print 'Robin goes home'
- level: '10'
sections:
- title: "Students so not use the for command correctly"
example:
error_text: |
We often see that students try to print the list (in the example animals) instead of the items of the list.
error_code: |
animals is dog, cat, blobfish
for animal in animals
print 'I love ' animals
solution_text: |
The word animals in the last line should be changed into animal.
solution_code: |
animals is dog, cat, blobfish
for animal in animals
print 'I love ' animal
- title: "Students forget the indentation"
example:
error_text: |
Students tend to forget to use indentation after a for command.
error_code: |
animals is dog, cat, blobfish
for animal in animals
print 'I love ' animals
solution_text: |
You should use indentation after a for command.
solution_code: |
animals is dog, cat, blobfish
for animal in animals
print 'I love ' animal
- level: '11'
sections:
- title: "Students forget to use indentation"
example:
error_text: |
Make sure that the students use indentation.
error_code: |
for i in range 1 to 5
print i
solution_text: |
This is the correct code:
solution_code: |
for i in range 1 to 5
print i
- title: "Students don't understand the i"
example:
error_text: |
Some students don't understand that i is a variable. i is chosen, because it is used in Python programming, but you could just as easily use a different variable name.
For example, this code:
error_code: |
for i in range 1 to 5
print i
solution_text: |
Could just as well be replaced with this code. It works the same.
solution_code: |
for banana in range 1 to 5
print banana
- level: '12'
sections:
- title: "Students forget quotation marks"
example:
error_text: |
Students need more quotation marks now than in the previous levels. In this example quotation marks were forgotten in the list and in the if command.
error_code: |
superheroes = Spiderman, Batman, Iron Man
superhero = superheroes at random
if superhero = Batman
print 'IM BATMAN!'
solution_text: |
This is the correct code:
solution_code: |
superheroes = 'Spiderman', 'Batman', 'Iron Man'
superhero = superheroes at random
if superhero is 'Batman'
print 'IM BATMAN!'
- title: "Students use quotation marks on numbers they want to use for calculations"
example:
error_text: |
You can use quotation marks on numbers, but only if you want the computer to think of them as text. This means you can't do calculations with the number.
In the example below, you can't do maths with the number 25, because it's in quotation marks.
error_code: |
score = '25'
answer is ask 'Do you want a point?'
if answer is 'yes'
score = score + 1
print score
solution_text: |
This is the correct code:
solution_code: |
score = 25
answer is ask 'Do you want a point?'
if answer is 'yes'
score = score + 1
print score
- title: "Students use commas instead of periods in decimal numbers"
example:
error_text: |
Decimal numbers can be used from this level on, but you can't use commas.
error_code: |
print 2,5 + 2,5
solution_text: |
This is the correct code:
solution_code: |
print 2.5 + 2.5
- level: '13'
sections:
- title: "Students confuse `and` with `or`"
example:
error_text: |
Both commands might appear similar, but their functions are very different.
error_code: |
game is ask 'Do you want to play a game?'
time is ask 'Do you have time to play?'
if game is 'yes' or time is 'yes'
print 'Lets play!'
solution_text: |
In this case, the person should answer yes on both questions, so you should use `and`.
solution_code: |
game is ask 'Do you want to play a game?'
time is ask 'Do you have time to play?'
if game is 'yes' and time is 'yes'
print 'Lets play!'
- level: '14'
sections:
- title: "Students confuse the < and > signs"
example:
error_text: |
Often, students are already familiar with these signs from maths class. But if your students don't know these signs yet, they might have a challenge with it.
error_code: |
age = ask 'How old are you?'
if age < 12
print 'You are older than I am!'
solution_text: |
This is the correct code:
solution_code: |
age = ask 'How old are you?'
if age > 12
print 'You are older than I am!'
- title: "Students use the wrong signs for `!=` `<=` and `>=`"
example:
error_text: |
These signs are probably new for most students. Make sure to explain these signs to your students.
error_code: |
name = ask 'What is your name?'
if name =< 'Hedy'
print 'You are not Hedy'
solution_text: |
This is the correct code:
solution_code: |
name = ask 'What is your name?'
if name != 'Hedy'
print 'You are not Hedy'
- title: "Students forget to use the == sign"
example:
error_text: |
In this level, students are still allowed to use = or is. But on other levels, or in python, they might get in trouble for that. So it is best to train them to use it.
error_code: |
name = ask 'What is your name?'
if name = 'Hedy'
print 'You are cool!'
solution_text: |
This is the correct code:
solution_code: |
name = ask 'What is your name?'
if name == 'Hedy'
print 'You are cool!'
- level: '15'
sections:
- title: "Students forget indentation in the while loop"
example:
error_text: |
Indentation is often hard for students.
error_code: |
answer = 0
while answer != 25
answer = ask 'What is 5 times 5?'
print 'A correct answer has been given'
solution_text: |
This is the correct code:
solution_code: |
answer = 0
while answer != 25
answer = ask 'What is 5 times 5?'
print 'A correct answer has been given'
- level: '16'
sections:
- title: "Students forget the brackets"
example:
error_text: |
From this level on lists should be in brackets.
error_code: |
icecream = 'starwberry', 'chocolate'
print 'I love ' icecream[random] ' icecream'
solution_text: |
This is the correct code:
solution_code: |
icecream = ['starwberry', 'chocolate']
print 'I love ' icecream[random] ' icecream'
- title: "Students use the wrong brackets"
example:
error_text: |
From this level on lists should be in brackets.
error_code: |
icecream = ('starwberry', 'chocolate'}
print 'I love ' icecream[random] ' icecream'
solution_text: |
This is the correct code:
solution_code: |
icecream = ['starwberry', 'chocolate']
print 'I love ' icecream[random] ' icecream'
- title: "Students forget the quotation marks while focussing on the brackets"
example:
error_text: |
Students are sometimes very focussed on the new aspect of the syntax, that they forget the quotation marks.
error_code: |
icecream = [starwberry, chocolate]
print 'I love ' icecream[random] ' icecream'
solution_text: |
This is the correct code:
solution_code: |
icecream = ['starwberry', 'chocolate']
print 'I love ' icecream[random] ' icecream'
- title: "Students still use the old at random command"
example:
error_text: |
Students are sometimes very focussed on the new aspect of the syntax, that they forget the quotation marks.
error_code: |
icecream = [starwberry, chocolate]
print 'I love ' icecream at random ' icecream'
solution_text: |
This is the correct code:
solution_code: |
icecream = ['starwberry', 'chocolate']