Skip to content

Commit 4c82e92

Browse files
authored
Merge pull request rage#35 from rage/quizzes-to-new-course
Checked that quizzes correct for first 7 parts
2 parents 1f1ec35 + 6240180 commit 4c82e92

18 files changed

Lines changed: 41 additions & 31 deletions

data/part-1/1-starting-programming.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ hidden: false
1818
</text-box>
1919

2020

21-
<quiz id="3799f901-ef2a-53da-b4c6-669fbbf0038a"></quiz>
21+
<quiz id="ae09155d-d056-5662-9611-f322cd50959d"></quiz>
2222

2323

2424
<!-- Nykyaikainen ohjelmointi tapahtuu lähes poikkeuksetta ohjelmointiympäristössä. Ohjelmointiympäristö sisältää joukon ohjelmoijaa auttavia aputoimintoja. Se ei rakenna ohjelmaa ohjelmoijan puolesta, mutta se muunmuassa vinkkaa helpoista virheistä ohjelmakoodissa ja auttaa ohjelmoijaa hahmottamaan ohjelman rakennetta. -->
@@ -103,4 +103,4 @@ Java programs require a "code boilerplate", the frame around the code, in order
103103
<!-- Alla on kurssin ensimmäinen kyselytehtävä. Kyselytehtäviin vastataan suoraan kurssimateriaalissa. -->
104104
Below is the first quiz of the course. You can answer the quizzes right here in the course material.
105105

106-
<quiz id="118e6b38-0d42-5667-a674-84ae174ad798"></quiz>
106+
<quiz id="398ad482-25d6-5817-8d95-375c4d15452c"></quiz>

data/part-1/5-calculating.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ How many days would you like to convert to seconds?
177177
</programming-exercise>
178178

179179

180-
<quiz id="54056702-b227-5747-8d6c-d3f15e8f5c8a"></quiz>
180+
<quiz id="7ab44ccb-cf41-5609-854d-3909d452404d"></quiz>
181181

182182
<!--
183183
<text-box variant='hint' name='Lauseke ja lause'>
@@ -250,7 +250,7 @@ int second = 4;
250250
first + second;
251251
```
252252

253-
<quiz id="f9af4add-d06f-59bb-ab42-d1cb9733ba88"></quiz>
253+
<quiz id="e7131986-67eb-55fd-b527-b2574f6de7df"></quiz>
254254

255255

256256
<!-- ## Laskentaa ja tulostamista -->
@@ -938,7 +938,7 @@ The average is 4.333333333333333
938938
</programming-exercise>
939939

940940

941-
<quiz id="cff67523-26f0-5f35-b00f-070778b40541"></quiz>
941+
<quiz id="a1b73ba2-e36e-5db5-99d3-991c502a94ea"></quiz>
942942

943943

944944
<!-- <programming-exercise name="Nelilaskin" tmcname='osa01-Osa01_23.Nelilaskin'> -->
@@ -1135,4 +1135,4 @@ You'll find a step-by-step visualization of the previous program below, which go
11351135

11361136
<code-states-visualizer input='{"code":"public class CalculationInSteps {\n public static void main(String[] args) {\n int first = (1 + 1);\n int second = first + 3 * (2 + 5);\n\n first = 5;\n\n int third = first + second;\n System.out.println(first);\n System.out.println(second);\n System.out.println(third);\n }\n}","stdin":"","trace":[{"stdout":"","event":"call","line":3,"stack_to_render":[{"func_name":"main:3","encoded_locals":{},"ordered_varnames":[],"parent_frame_id_list":[],"is_highlighted":true,"is_zombie":false,"is_parent":false,"unique_hash":"1","frame_id":1}],"globals":{},"ordered_globals":[],"func_name":"main","heap":{}},{"stdout":"","event":"step_line","line":3,"stack_to_render":[{"func_name":"main:3","encoded_locals":{},"ordered_varnames":[],"parent_frame_id_list":[],"is_highlighted":true,"is_zombie":false,"is_parent":false,"unique_hash":"2","frame_id":2}],"globals":{},"ordered_globals":[],"func_name":"main","heap":{}},{"stdout":"","event":"step_line","line":4,"stack_to_render":[{"func_name":"main:4","encoded_locals":{"first":2},"ordered_varnames":["first"],"parent_frame_id_list":[],"is_highlighted":true,"is_zombie":false,"is_parent":false,"unique_hash":"4","frame_id":4}],"globals":{},"ordered_globals":[],"func_name":"main","heap":{}},{"stdout":"","event":"step_line","line":6,"stack_to_render":[{"func_name":"main:6","encoded_locals":{"first":2,"second":23},"ordered_varnames":["first","second"],"parent_frame_id_list":[],"is_highlighted":true,"is_zombie":false,"is_parent":false,"unique_hash":"9","frame_id":9}],"globals":{},"ordered_globals":[],"func_name":"main","heap":{}},{"stdout":"","event":"step_line","line":8,"stack_to_render":[{"func_name":"main:8","encoded_locals":{"first":5,"second":23},"ordered_varnames":["first","second"],"parent_frame_id_list":[],"is_highlighted":true,"is_zombie":false,"is_parent":false,"unique_hash":"12","frame_id":12}],"globals":{},"ordered_globals":[],"func_name":"main","heap":{}},{"stdout":"","event":"step_line","line":9,"stack_to_render":[{"func_name":"main:9","encoded_locals":{"first":5,"second":23,"third":28},"ordered_varnames":["first","second","third"],"parent_frame_id_list":[],"is_highlighted":true,"is_zombie":false,"is_parent":false,"unique_hash":"17","frame_id":17}],"globals":{},"ordered_globals":[],"func_name":"main","heap":{}},{"stdout":"5\n","event":"step_line","line":10,"stack_to_render":[{"func_name":"main:10","encoded_locals":{"first":5,"second":23,"third":28},"ordered_varnames":["first","second","third"],"parent_frame_id_list":[],"is_highlighted":true,"is_zombie":false,"is_parent":false,"unique_hash":"21","frame_id":21}],"globals":{},"ordered_globals":[],"func_name":"main","heap":{}},{"stdout":"5\n23\n","event":"step_line","line":11,"stack_to_render":[{"func_name":"main:11","encoded_locals":{"first":5,"second":23,"third":28},"ordered_varnames":["first","second","third"],"parent_frame_id_list":[],"is_highlighted":true,"is_zombie":false,"is_parent":false,"unique_hash":"24","frame_id":24}],"globals":{},"ordered_globals":[],"func_name":"main","heap":{}},{"stdout":"5\n23\n28\n","event":"step_line","line":12,"stack_to_render":[{"func_name":"main:12","encoded_locals":{"first":5,"second":23,"third":28},"ordered_varnames":["first","second","third"],"parent_frame_id_list":[],"is_highlighted":true,"is_zombie":false,"is_parent":false,"unique_hash":"27","frame_id":27}],"globals":{},"ordered_globals":[],"func_name":"main","heap":{}},{"stdout":"5\n23\n28\n","event":"return","line":12,"stack_to_render":[{"func_name":"main:12","encoded_locals":{"first":5,"second":23,"third":28,"__return__":["VOID"]},"ordered_varnames":["first","second","third","__return__"],"parent_frame_id_list":[],"is_highlighted":true,"is_zombie":false,"is_parent":false,"unique_hash":"28","frame_id":28}],"globals":{},"ordered_globals":[],"func_name":"main","heap":{}}],"userlog":"Debugger VM maxMemory: 455M\n"}'></code-states-visualizer>
11371137

1138-
<quiz id="286b44eb-0a4f-51de-9c67-68d5351a3b37"></quiz>
1138+
<quiz id="01bc169c-8882-5cb3-99b1-286fe9775baf"></quiz>

data/part-1/7-programming-in-our-society.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,7 @@ After this course, simple instructions, such as "_Buy two cartons of milk. If th
4242
<!-- Mukavaa, että olet lähtenyt mukaan tälle matkalle! -->
4343

4444
Great to have you on this journey!
45+
46+
Please, take a moment to answer a self-reflective survey on the learning goals of the first part.
47+
48+
<quiz id="25799beb-4e90-51d5-a4ad-41410c28245b"></quiz>

data/part-2/1-problems-and-patterns.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public class Program {
7272
}
7373
```
7474

75-
<!-- TODO: quiz -- ohjelma, jossa käyttäjältä kysytään luku ja merkkijono, tulostus käyttää niitä -- kysytään mitä käyttäjän tulee syöttää, jotta tulostus tietty -->
75+
<quiz id="b7705d46-9213-4ec2-b144-f27d14cd7287"></quiz>
7676

7777

7878
<!-- ## Laskemista -->
@@ -390,7 +390,7 @@ The quiz below uses `System.out.print` for printing. It works exactly like `Syst
390390

391391
</text-box>
392392

393-
<quiz id="ba233660-b119-5c9a-9b75-7b34b0ceb8ef"></quiz>
393+
<quiz id="cf7bfa61-dc45-56f2-8913-fa8671dbfc4d"></quiz>
394394

395395

396396
<!-- Ehtotoiminnallisuutta voi yhdistää myös muiden ratkaisumallien kanssa. Tarkastellaan ongelmaa "Lue käyttäjältä kaksi lukua. Mikäli lukujen summa on yli 100, tulosta käyttäjälle merkkijono `liikaa`. Mikäli lukujen summa on alle 0, tulosta käyttäjälle merkkijono `liian vähän`. Muulloin, tulosta käyttäjälle merkkijono `ok`.". Ohjelma, joka yhdistää lukemisen, laskemisen ja ehtolauseen on annettu alla. -->

data/part-2/2-repeating.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ while (true) {
322322
<!-- TODO: tänne tarttee visualisoinnin -->
323323
<!-- TODO: this requires a visualization -->
324324

325-
<quiz id="36891f81-9e52-5546-97c3-4c2f0f180135"></quiz>
325+
<quiz id="dd3c81f5-4644-5add-a6bb-6a54a488fd08"></quiz>
326326

327327
<!-- <programming-exercise name="Syötteiden rajaus" tmcname='osa02-Osa02_07.SyotteidenRajaus'> -->
328328
<programming-exercise name="Only positives" tmcname='part02-Part02_07.OnlyPositives'>

data/part-2/4-methods.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,7 @@ public static void thisMethodSaysWoof() {
389389
}
390390
```
391391

392+
<quiz id="affd4181-8c25-43c5-b81c-e8a411498ac6"></quiz>
392393

393394
<!-- ## Metodin parametrit -->
394395

@@ -880,7 +881,7 @@ Incrementing the variable `number` inside the method poses no problem. This does
880881
The parameter `number`is copied for the method to use -- in other words, a new variable called `number` is created for the `incrementByThree` method, and the value of the variable `number` in the main program is copied as its value when the method is called. The variable `number` inside the method `incrementByThree` exists only for the duration of the method execution, and it has no relation to the similarly named variable in the main program.
881882

882883

883-
<quiz id="2169d451-4364-5aa3-ba85-9dedd6e8abfc"></quiz>
884+
<quiz id="1ec65f26-f66e-55d9-aa22-5a36ae9e3484"></quiz>
884885

885886

886887
<!-- ## Metodi voi palauttaa arvon -->
@@ -1277,7 +1278,7 @@ public static void main(String[] args) {
12771278

12781279
Here the method call occurs first and it returns the value 5.0. After this that value is printed with the help of the print statement.
12791280

1280-
<quiz id="270d9aea-6ee9-568d-8775-7dfdea451f90"></quiz>
1281+
<quiz id="0fcb023f-22d0-5e8f-bf40-54307efb0077"></quiz>
12811282

12821283

12831284

@@ -1412,7 +1413,7 @@ public static int sum(int first, int second) {
14121413
Now the value of the variable `number1` is copied as the value of the method parameter `first`, and the value of the variable `number1` copied as the value of the parameter `second`.
14131414

14141415

1415-
<quiz id="664a4f19-6fbc-5a76-83cd-aabd32a94809"></quiz>
1416+
<quiz id="fa98830f-8715-5acb-ae72-aad063574ae0"></quiz>
14161417

14171418

14181419
<youtube id='zEHvycTo81c'></youtube>

data/part-2/5-end-questionnaire.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ title: 'End questionnaire'
44
hidden: true
55
---
66

7-
Please answer the questionnaire to complete the course part!
7+
<!-- Ohjelmat kasvavat kun niihin lisätään toiminnallisuutta. Ohjelmien kasvaessa myös niiden monimutkaisuus kasvaa, mikä johtaa siihen, että ohjelmakoodia on vaikeampi ymmärtää. Otimme tässä osassa ensiaskeleet ohjelmien monimutkaisuuden hallintaan: toistolauseilla ohjelmakoodia voidaan ajaa uudestaan ja uudestaan, ja metodeilla ohjelmia voidaan jakaa pienempiin ymmärrettäviin osakokonaisuuksiin. -->
88

9-
<quiz id="3a8b996b-3560-50e6-9851-dd27aff33edf"></quiz>
9+
Programs grow in size as we add more functionality to them. When program size increases, so does the complecity, which results in source code that is more difficult to understand. In this part we took our first steps towards managing program complexity: repeat statements can be used to execute program code time and again, and methods allow for dividing a program into smaller, more manageable parts.
10+
11+
<!-- Vastaa vielä lopuksi seuraavaan toisen osan osaamistavoitteita tarkastelevaan itsearviointikyselyyn. -->
12+
13+
Please take a moment to answer a self-reflective questionnaire on the learning goals of the second part.
14+
15+
<quiz id="18102a59-202d-56c6-a214-5e3ae0e41d33"></quiz>

data/part-3/1-discovering-errors.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ if (sum == 0) {
9191
}
9292
```
9393

94-
<quiz id="6087477b-0ffe-517f-a0b2-c30d1013057e"></quiz>
94+
<quiz id="4f6de7ae-549b-561b-90d4-1dd4ff199c49"></quiz>
9595

9696
<!-- Tahaton sokeus on asia, jota ei voi varsinaisesti kytkeä pois päältä. Ohjelmoija voi kuitenkin muutamien kikkojen avulla vähentää sen esiintymistä -- näistä ensimmäinen on taukojen pitäminen, joka luonnollisesti vaatii työn ajoissa aloittamisen. Lisäksi esimerkiksi koodin kommentointi, nimentä ja "debug"-tulosteet auttavat myös. -->
9797

@@ -331,4 +331,4 @@ if (sum == 0) {
331331

332332
When a program is executed multiple times with appropriate inputs the hidden error is often found. Coming up with relevant inputs is a skill in its own right. It's essential to test the so-called corner cases, i.e., circumstances where the program execution could be exceptional. An example scenario would be one where the user does not enter a single acceptable value or enters zeros or very large values.
333333

334-
<quiz id="a09ef709-eabc-5832-91f3-c9d807f7b587"></quiz>
334+
<quiz id="80626f3b-c1e4-58b6-9e78-49a60baf81e7"></quiz>

data/part-3/2-lists.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ Similarly, by calling the method `get` with the parameter 4 the fifth number in
529529

530530
</text-box>
531531

532-
<quiz id="f90c14f3-f138-5f12-8541-e6cd5776b4c9"></quiz>
532+
<quiz id="74f0a85a-ca71-5c4a-b21a-8065653a2187"></quiz>
533533

534534
<!-- <text-box variant='hint' name='Useamman Javan valmiin työvälineen tuominen ohjelmaan'> -->
535535

@@ -1834,9 +1834,9 @@ System.out.println("Index 1 so the second value: " + list.get(1));
18341834

18351835
</sample-output>
18361836

1837-
<quiz id="dd54e3d8-51fb-51c6-9175-065e1a9d98be"></quiz>
1837+
<quiz id="c4470859-e0d1-5d22-a9d9-134360c56cab"></quiz>
18381838

1839-
<quiz id="436e3c74-4b71-5a49-9c04-bc4e21bce6a5"></quiz>
1839+
<quiz id="a3a40d42-e0c2-5cd1-811e-dda9e056c5a0"></quiz>
18401840

18411841
<!-- Arvon hakeminen listalta onnistuu listan metodilla **contains**. Metodi saa haettavan arvon parametrina ja palauttaa boolean-tyyppisen arvon (`true` tai `false`), joka kertoo löytyykö haettua arvoa listalta. -->
18421842

data/part-3/3-arrays.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ int number = numbers[index];
173173
System.out.println(numbers);
174174
```
175175

176-
<quiz id="9acde5da-37ca-5065-83f6-f90010f366c4"></quiz>
176+
<quiz id="8c630846-5a8e-5afd-a65b-d171baabca57"></quiz>
177177

178178
<programming-exercise name='Swap' tmcname='part03-Part03_18.Swap'>
179179

0 commit comments

Comments
 (0)