-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update a boat load of new stuff in exe w02
- Loading branch information
1 parent
d746da7
commit 2c06066
Showing
36 changed files
with
832 additions
and
685 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
object SumMinMax { | ||
def main(args: Array[String]): Unit = { | ||
val ints = args.map(_.toInt) | ||
println(ints.sum + " " + ints.min + " " + ints.max) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
object SwapFirstLastArg { | ||
def main(args: Array[String]): Unit = { | ||
if (args.size > 1) { | ||
val temp = args(0) | ||
args(0) = args(args.size -1) | ||
args(args.size -1) = temp | ||
} | ||
println(args.mkString(" ")) | ||
} | ||
} |
32 changes: 16 additions & 16 deletions
32
compendium/generated/quiz-w01-concepts-solurows-generated.tex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
litteral & 1 & ~~\Large$\leadsto$~~ & O & anger ett specifikt datavärde \\ | ||
sträng & 2 & ~~\Large$\leadsto$~~ & H & en sekvens av tecken \\ | ||
sats & 3 & ~~\Large$\leadsto$~~ & N & en kodrad som gör något; kan särskiljas med semikolon \\ | ||
uttryck & 4 & ~~\Large$\leadsto$~~ & A & kombinerar värden och funktioner till ett nytt värde \\ | ||
funktion & 5 & ~~\Large$\leadsto$~~ & G & vid anrop beräknas ett returvärde \\ | ||
procedur & 6 & ~~\Large$\leadsto$~~ & M & vid anrop sker (sido)effekt; returvärdet är tomt \\ | ||
exekveringsfel & 7 & ~~\Large$\leadsto$~~ & L & sker medan programmet kör \\ | ||
kompileringsfel & 8 & ~~\Large$\leadsto$~~ & K & sker innan exekveringen startat \\ | ||
abstrahera & 9 & ~~\Large$\leadsto$~~ & F & att införa nya begrepp som förenklar kodningen \\ | ||
kompilera & 10 & ~~\Large$\leadsto$~~ & E & att översätta kod till exekverbar form \\ | ||
typ & 11 & ~~\Large$\leadsto$~~ & J & beskriver vad data kan användas till \\ | ||
for-sats & 12 & ~~\Large$\leadsto$~~ & P & bra då antalet repetitioner är bestämt i förväg \\ | ||
while-sats & 13 & ~~\Large$\leadsto$~~ & C & bra då antalet repetitioner ej är bestämt i förväg \\ | ||
tilldelning & 14 & ~~\Large$\leadsto$~~ & B & för att ändra en variabels värde \\ | ||
flyttal & 15 & ~~\Large$\leadsto$~~ & I & decimaltal med begränsad noggrannhet \\ | ||
boolesk & 16 & ~~\Large$\leadsto$~~ & D & antingen sann eller falsk \\ | ||
litteral & 1 & ~~\Large$\leadsto$~~ & M & anger ett specifikt datavärde \\ | ||
sträng & 2 & ~~\Large$\leadsto$~~ & N & en sekvens av tecken \\ | ||
sats & 3 & ~~\Large$\leadsto$~~ & P & en kodrad som gör något; kan särskiljas med semikolon \\ | ||
uttryck & 4 & ~~\Large$\leadsto$~~ & K & kombinerar värden och funktioner till ett nytt värde \\ | ||
funktion & 5 & ~~\Large$\leadsto$~~ & O & vid anrop beräknas ett returvärde \\ | ||
procedur & 6 & ~~\Large$\leadsto$~~ & A & vid anrop sker (sido)effekt; returvärdet är tomt \\ | ||
exekveringsfel & 7 & ~~\Large$\leadsto$~~ & C & sker medan programmet kör \\ | ||
kompileringsfel & 8 & ~~\Large$\leadsto$~~ & E & sker innan exekveringen startat \\ | ||
abstrahera & 9 & ~~\Large$\leadsto$~~ & L & att införa nya begrepp som förenklar kodningen \\ | ||
kompilera & 10 & ~~\Large$\leadsto$~~ & F & att översätta kod till exekverbar form \\ | ||
typ & 11 & ~~\Large$\leadsto$~~ & G & beskriver vad data kan användas till \\ | ||
for-sats & 12 & ~~\Large$\leadsto$~~ & J & bra då antalet repetitioner är bestämt i förväg \\ | ||
while-sats & 13 & ~~\Large$\leadsto$~~ & D & bra då antalet repetitioner ej är bestämt i förväg \\ | ||
tilldelning & 14 & ~~\Large$\leadsto$~~ & I & för att ändra en variabels värde \\ | ||
flyttal & 15 & ~~\Large$\leadsto$~~ & H & decimaltal med begränsad noggrannhet \\ | ||
boolesk & 16 & ~~\Large$\leadsto$~~ & B & antingen sann eller falsk \\ |
32 changes: 16 additions & 16 deletions
32
compendium/generated/quiz-w01-concepts-taskrows-generated.tex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
litteral & 1 & & A & kombinerar värden och funktioner till ett nytt värde \\ | ||
sträng & 2 & & B & för att ändra en variabels värde \\ | ||
sats & 3 & & C & bra då antalet repetitioner ej är bestämt i förväg \\ | ||
uttryck & 4 & & D & antingen sann eller falsk \\ | ||
funktion & 5 & & E & att översätta kod till exekverbar form \\ | ||
procedur & 6 & & F & att införa nya begrepp som förenklar kodningen \\ | ||
exekveringsfel & 7 & & G & vid anrop beräknas ett returvärde \\ | ||
kompileringsfel & 8 & & H & en sekvens av tecken \\ | ||
abstrahera & 9 & & I & decimaltal med begränsad noggrannhet \\ | ||
kompilera & 10 & & J & beskriver vad data kan användas till \\ | ||
typ & 11 & & K & sker innan exekveringen startat \\ | ||
for-sats & 12 & & L & sker medan programmet kör \\ | ||
while-sats & 13 & & M & vid anrop sker (sido)effekt; returvärdet är tomt \\ | ||
tilldelning & 14 & & N & en kodrad som gör något; kan särskiljas med semikolon \\ | ||
flyttal & 15 & & O & anger ett specifikt datavärde \\ | ||
boolesk & 16 & & P & bra då antalet repetitioner är bestämt i förväg \\ | ||
litteral & 1 & & A & vid anrop sker (sido)effekt; returvärdet är tomt \\ | ||
sträng & 2 & & B & antingen sann eller falsk \\ | ||
sats & 3 & & C & sker medan programmet kör \\ | ||
uttryck & 4 & & D & bra då antalet repetitioner ej är bestämt i förväg \\ | ||
funktion & 5 & & E & sker innan exekveringen startat \\ | ||
procedur & 6 & & F & att översätta kod till exekverbar form \\ | ||
exekveringsfel & 7 & & G & beskriver vad data kan användas till \\ | ||
kompileringsfel & 8 & & H & decimaltal med begränsad noggrannhet \\ | ||
abstrahera & 9 & & I & för att ändra en variabels värde \\ | ||
kompilera & 10 & & J & bra då antalet repetitioner är bestämt i förväg \\ | ||
typ & 11 & & K & kombinerar värden och funktioner till ett nytt värde \\ | ||
for-sats & 12 & & L & att införa nya begrepp som förenklar kodningen \\ | ||
while-sats & 13 & & M & anger ett specifikt datavärde \\ | ||
tilldelning & 14 & & N & en sekvens av tecken \\ | ||
flyttal & 15 & & O & vid anrop beräknas ett returvärde \\ | ||
boolesk & 16 & & P & en kodrad som gör något; kan särskiljas med semikolon \\ |
14 changes: 7 additions & 7 deletions
14
compendium/generated/quiz-w01-intdiv-solurows-generated.tex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
\code| 4 / 42 | & 1 & ~~\Large$\leadsto$~~ & B & \code| 0: Int | \\ | ||
\code| 42.0 / 2 | & 2 & ~~\Large$\leadsto$~~ & A & \code| 10.5: Double | \\ | ||
\code| 42 / 4 | & 3 & ~~\Large$\leadsto$~~ & G & \code| 10: Int | \\ | ||
\code| 42 % 4 | & 4 & ~~\Large$\leadsto$~~ & D & \code| 2: Int | \\ | ||
\code| 4 % 42 | & 5 & ~~\Large$\leadsto$~~ & C & \code| 4: Int | \\ | ||
\code| 40 % 4 == 0 | & 6 & ~~\Large$\leadsto$~~ & E & \code|true : Boolean | \\ | ||
\code| 42 % 4 == 0 | & 7 & ~~\Large$\leadsto$~~ & F & \code|false: Boolean | \\ | ||
\code| 4 / 42 | & 1 & ~~\Large$\leadsto$~~ & G & \code| 0: Int | \\ | ||
\code| 42.0 / 2 | & 2 & ~~\Large$\leadsto$~~ & F & \code| 10.5: Double | \\ | ||
\code| 42 / 4 | & 3 & ~~\Large$\leadsto$~~ & E & \code| 10: Int | \\ | ||
\code| 42 % 4 | & 4 & ~~\Large$\leadsto$~~ & B & \code| 2: Int | \\ | ||
\code| 4 % 42 | & 5 & ~~\Large$\leadsto$~~ & A & \code| 4: Int | \\ | ||
\code| 40 % 4 == 0 | & 6 & ~~\Large$\leadsto$~~ & D & \code|true : Boolean | \\ | ||
\code| 42 % 4 == 0 | & 7 & ~~\Large$\leadsto$~~ & C & \code|false: Boolean | \\ |
14 changes: 7 additions & 7 deletions
14
compendium/generated/quiz-w01-intdiv-taskrows-generated.tex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
\code| 4 / 42 | & 1 & & A & \code| 10.5: Double | \\ | ||
\code| 42.0 / 2 | & 2 & & B & \code| 0: Int | \\ | ||
\code| 42 / 4 | & 3 & & C & \code| 4: Int | \\ | ||
\code| 42 % 4 | & 4 & & D & \code| 2: Int | \\ | ||
\code| 4 % 42 | & 5 & & E & \code|true : Boolean | \\ | ||
\code| 40 % 4 == 0 | & 6 & & F & \code|false: Boolean | \\ | ||
\code| 42 % 4 == 0 | & 7 & & G & \code| 10: Int | \\ | ||
\code| 4 / 42 | & 1 & & A & \code| 4: Int | \\ | ||
\code| 42.0 / 2 | & 2 & & B & \code| 2: Int | \\ | ||
\code| 42 / 4 | & 3 & & C & \code|false: Boolean | \\ | ||
\code| 42 % 4 | & 4 & & D & \code|true : Boolean | \\ | ||
\code| 4 % 42 | & 5 & & E & \code| 10: Int | \\ | ||
\code| 40 % 4 == 0 | & 6 & & F & \code| 10.5: Double | \\ | ||
\code| 42 % 4 == 0 | & 7 & & G & \code| 0: Int | \\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
\code|1 | & 1 & ~~\Large$\leadsto$~~ & A & \code|Int | \\ | ||
\code|1L | & 2 & ~~\Large$\leadsto$~~ & J & \code|Long | \\ | ||
\code|1.0 | & 3 & ~~\Large$\leadsto$~~ & I & \code|Double | \\ | ||
\code|1D | & 4 & ~~\Large$\leadsto$~~ & G & \code|Double | \\ | ||
\code|1F | & 5 & ~~\Large$\leadsto$~~ & E & \code|Float | \\ | ||
\code|'1' | & 6 & ~~\Large$\leadsto$~~ & F & \code|Char | \\ | ||
\code|"1"| & 7 & ~~\Large$\leadsto$~~ & B & \code|String | \\ | ||
\code|1 | & 1 & ~~\Large$\leadsto$~~ & B & \code|Int | \\ | ||
\code|1L | & 2 & ~~\Large$\leadsto$~~ & H & \code|Long | \\ | ||
\code|1.0 | & 3 & ~~\Large$\leadsto$~~ & J & \code|Double | \\ | ||
\code|1D | & 4 & ~~\Large$\leadsto$~~ & F & \code|Double | \\ | ||
\code|1F | & 5 & ~~\Large$\leadsto$~~ & A & \code|Float | \\ | ||
\code|'1' | & 6 & ~~\Large$\leadsto$~~ & G & \code|Char | \\ | ||
\code|"1"| & 7 & ~~\Large$\leadsto$~~ & D & \code|String | \\ | ||
\code|true | & 8 & ~~\Large$\leadsto$~~ & C & \code|Boolean| \\ | ||
\code|false| & 9 & ~~\Large$\leadsto$~~ & D & \code|Boolean| \\ | ||
\code|() | & 10 & ~~\Large$\leadsto$~~ & H & \code|Unit | \\ | ||
\code|false| & 9 & ~~\Large$\leadsto$~~ & E & \code|Boolean| \\ | ||
\code|() | & 10 & ~~\Large$\leadsto$~~ & I & \code|Unit | \\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
\code|1 | & 1 & & A & \code|Int | \\ | ||
\code|1L | & 2 & & B & \code|String | \\ | ||
\code|1 | & 1 & & A & \code|Float | \\ | ||
\code|1L | & 2 & & B & \code|Int | \\ | ||
\code|1.0 | & 3 & & C & \code|Boolean| \\ | ||
\code|1D | & 4 & & D & \code|Boolean| \\ | ||
\code|1F | & 5 & & E & \code|Float | \\ | ||
\code|'1' | & 6 & & F & \code|Char | \\ | ||
\code|"1"| & 7 & & G & \code|Double | \\ | ||
\code|true | & 8 & & H & \code|Unit | \\ | ||
\code|false| & 9 & & I & \code|Double | \\ | ||
\code|() | & 10 & & J & \code|Long | \\ | ||
\code|1D | & 4 & & D & \code|String | \\ | ||
\code|1F | & 5 & & E & \code|Boolean| \\ | ||
\code|'1' | & 6 & & F & \code|Double | \\ | ||
\code|"1"| & 7 & & G & \code|Char | \\ | ||
\code|true | & 8 & & H & \code|Long | \\ | ||
\code|false| & 9 & & I & \code|Unit | \\ | ||
\code|() | & 10 & & J & \code|Double | \\ |
20 changes: 10 additions & 10 deletions
20
compendium/generated/quiz-w01-values-solurows-generated.tex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
\code|1.0 + 18 | & 1 & ~~\Large$\leadsto$~~ & H & \code|19.0: Double | \\ | ||
\code|(41 + 1).toDouble | & 2 & ~~\Large$\leadsto$~~ & C & \code|42.0: Double | \\ | ||
\code|1.042e42 + 1 | & 3 & ~~\Large$\leadsto$~~ & K & \code|1.042E42: Double| \\ | ||
\code|12E6.toLong | & 4 & ~~\Large$\leadsto$~~ & D & \code|12000000: Long | \\ | ||
\code|32.toChar.toString| & 5 & ~~\Large$\leadsto$~~ & J & \code|" ": String | \\ | ||
\code|'A'.toInt | & 6 & ~~\Large$\leadsto$~~ & A & \code|65: Int | \\ | ||
\code|0.toInt | & 7 & ~~\Large$\leadsto$~~ & F & \code|0: Int | \\ | ||
\code|'0'.toInt | & 8 & ~~\Large$\leadsto$~~ & G & \code|48: Int | \\ | ||
\code|'9'.toInt | & 9 & ~~\Large$\leadsto$~~ & E & \code|57: Int | \\ | ||
\code|'A' + '0' | & 10 & ~~\Large$\leadsto$~~ & I & \code|113: Int | \\ | ||
\code|(41 + 1).toDouble | & 2 & ~~\Large$\leadsto$~~ & I & \code|42.0: Double | \\ | ||
\code|1.042e42 + 1 | & 3 & ~~\Large$\leadsto$~~ & D & \code|1.042E42: Double| \\ | ||
\code|12E6.toLong | & 4 & ~~\Large$\leadsto$~~ & J & \code|12000000: Long | \\ | ||
\code|32.toChar.toString| & 5 & ~~\Large$\leadsto$~~ & C & \code|" ": String | \\ | ||
\code|'A'.toInt | & 6 & ~~\Large$\leadsto$~~ & G & \code|65: Int | \\ | ||
\code|0.toInt | & 7 & ~~\Large$\leadsto$~~ & K & \code|0: Int | \\ | ||
\code|'0'.toInt | & 8 & ~~\Large$\leadsto$~~ & E & \code|48: Int | \\ | ||
\code|'9'.toInt | & 9 & ~~\Large$\leadsto$~~ & F & \code|57: Int | \\ | ||
\code|'A' + '0' | & 10 & ~~\Large$\leadsto$~~ & B & \code|113: Int | \\ | ||
\code|('A' + '0').toChar| & 11 & ~~\Large$\leadsto$~~ & L & \code|'q': Char | \\ | ||
\code|"*!%#".charAt(0)| & 12 & ~~\Large$\leadsto$~~ & B & \code|'*': Char | \\ | ||
\code|"*!%#".charAt(0)| & 12 & ~~\Large$\leadsto$~~ & A & \code|'*': Char | \\ |
20 changes: 10 additions & 10 deletions
20
compendium/generated/quiz-w01-values-taskrows-generated.tex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
\code|1.0 + 18 | & 1 & & A & \code|65: Int | \\ | ||
\code|(41 + 1).toDouble | & 2 & & B & \code|'*': Char | \\ | ||
\code|1.042e42 + 1 | & 3 & & C & \code|42.0: Double | \\ | ||
\code|12E6.toLong | & 4 & & D & \code|12000000: Long | \\ | ||
\code|32.toChar.toString| & 5 & & E & \code|57: Int | \\ | ||
\code|'A'.toInt | & 6 & & F & \code|0: Int | \\ | ||
\code|0.toInt | & 7 & & G & \code|48: Int | \\ | ||
\code|1.0 + 18 | & 1 & & A & \code|'*': Char | \\ | ||
\code|(41 + 1).toDouble | & 2 & & B & \code|113: Int | \\ | ||
\code|1.042e42 + 1 | & 3 & & C & \code|" ": String | \\ | ||
\code|12E6.toLong | & 4 & & D & \code|1.042E42: Double| \\ | ||
\code|32.toChar.toString| & 5 & & E & \code|48: Int | \\ | ||
\code|'A'.toInt | & 6 & & F & \code|57: Int | \\ | ||
\code|0.toInt | & 7 & & G & \code|65: Int | \\ | ||
\code|'0'.toInt | & 8 & & H & \code|19.0: Double | \\ | ||
\code|'9'.toInt | & 9 & & I & \code|113: Int | \\ | ||
\code|'A' + '0' | & 10 & & J & \code|" ": String | \\ | ||
\code|('A' + '0').toChar| & 11 & & K & \code|1.042E42: Double| \\ | ||
\code|'9'.toInt | & 9 & & I & \code|42.0: Double | \\ | ||
\code|'A' + '0' | & 10 & & J & \code|12000000: Long | \\ | ||
\code|('A' + '0').toChar| & 11 & & K & \code|0: Int | \\ | ||
\code|"*!%#".charAt(0)| & 12 & & L & \code|'q': Char | \\ |
2 changes: 2 additions & 0 deletions
2
compendium/generated/quiz-w02-array-vector-append-solurows-generated.tex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Vector & 1 & ~~\Large$\leadsto$~~ & B & varianter med fler/andra element skapas snabbt ur befintlig \\ | ||
Array & 2 & ~~\Large$\leadsto$~~ & A & långsam vid ändring av storlek (kopiering av rubbet krävs) \\ |
2 changes: 2 additions & 0 deletions
2
compendium/generated/quiz-w02-array-vector-append-taskrows-generated.tex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Vector & 1 & & A & långsam vid ändring av storlek (kopiering av rubbet krävs) \\ | ||
Array & 2 & & B & varianter med fler/andra element skapas snabbt ur befintlig \\ |
2 changes: 2 additions & 0 deletions
2
compendium/generated/quiz-w02-array-vector-equality-solurows-generated.tex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Vector & 1 & ~~\Large$\leadsto$~~ & A & \code|xs == ys| är \code|true| om alla element lika \\ | ||
Array & 2 & ~~\Large$\leadsto$~~ & B & olikt andra samlingar kollar \code|==| ej innehållslikhet \\ |
2 changes: 2 additions & 0 deletions
2
compendium/generated/quiz-w02-array-vector-equality-taskrows-generated.tex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Vector & 1 & & A & \code|xs == ys| är \code|true| om alla element lika \\ | ||
Array & 2 & & B & olikt andra samlingar kollar \code|==| ej innehållslikhet \\ |
2 changes: 2 additions & 0 deletions
2
compendium/generated/quiz-w02-array-vector-mutability-solurows-generated.tex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Vector & 1 & ~~\Large$\leadsto$~~ & A & oföränderlig \\ | ||
Array & 2 & ~~\Large$\leadsto$~~ & B & förändringsbar \\ |
2 changes: 2 additions & 0 deletions
2
compendium/generated/quiz-w02-array-vector-mutability-taskrows-generated.tex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Vector & 1 & & A & oföränderlig \\ | ||
Array & 2 & & B & förändringsbar \\ |
21 changes: 11 additions & 10 deletions
21
compendium/generated/quiz-w02-collection-methods-solurows-generated.tex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
\code|Array.fill(9)(0) | & 1 & ~~\Large$\leadsto$~~ & I & skapar ny förändringsbar sekvens med 9 nollor \\ | ||
\code|Vector.fill(9)(' ')| & 2 & ~~\Large$\leadsto$~~ & F & skapar ny oföränderlig sekvens med 9 blanktecken \\ | ||
\code|xs.apply(0) | & 3 & ~~\Large$\leadsto$~~ & D & indexera i sekvenssamling; ger första elementet \\ | ||
\code|xs(0) | & 4 & ~~\Large$\leadsto$~~ & C & indexera i sekvenssamling; ger första elementet \\ | ||
\code|xs :+ 0 | & 5 & ~~\Large$\leadsto$~~ & G & skapar ny samling med en nolla tillagd på slutet \\ | ||
\code|0 +: xs | & 6 & ~~\Large$\leadsto$~~ & A & skapar ny samling med en nolla tillagd i början \\ | ||
\code|xs.mkString | & 7 & ~~\Large$\leadsto$~~ & E & skapar en sträng med alla element intill varandra \\ | ||
\code|xs.mkString(",") | & 8 & ~~\Large$\leadsto$~~ & B & skapar en sträng med komma mellan elementen \\ | ||
\code|xs.map(_.toString))| & 9 & ~~\Large$\leadsto$~~ & J & ny samling med elementen omgjorda till strängar \\ | ||
\code|xs.map(_.toInt)) | & 10 & ~~\Large$\leadsto$~~ & H & ny samling med elementen omgjorda till heltal \\ | ||
\code|val xs = Vector(2) | & 1 & ~~\Large$\leadsto$~~ & K & ny referens till sekvens av längd 1 \\ | ||
\code|Array.fill(9)(0) | & 2 & ~~\Large$\leadsto$~~ & C & ny förändringsbar sekvens med nollor \\ | ||
\code|Vector.fill(9)(' ')| & 3 & ~~\Large$\leadsto$~~ & A & ny oföränderlig sekvens med blanktecken \\ | ||
\code|xs(0) | & 4 & ~~\Large$\leadsto$~~ & I & förkortad skrivning av \code|apply(0)| \\ | ||
\code|xs.apply(0) | & 5 & ~~\Large$\leadsto$~~ & F & indexering, ger första elementet \\ | ||
\code|xs :+ 0 | & 6 & ~~\Large$\leadsto$~~ & D & ny samling med en nolla tillagd på slutet \\ | ||
\code|0 +: xs | & 7 & ~~\Large$\leadsto$~~ & J & ny samling med en nolla tillagd i början \\ | ||
\code|xs.mkString | & 8 & ~~\Large$\leadsto$~~ & G & ny sträng med alla element intill varandra \\ | ||
\code|xs.mkString(",") | & 9 & ~~\Large$\leadsto$~~ & B & ny sträng med komma mellan elementen \\ | ||
\code|xs.map(_.toString))| & 10 & ~~\Large$\leadsto$~~ & H & ny samling, elementen omgjorda till strängar \\ | ||
\code|xs.map(_.toInt)) | & 11 & ~~\Large$\leadsto$~~ & E & ny samling, elementen omgjorda till heltal \\ |
21 changes: 11 additions & 10 deletions
21
compendium/generated/quiz-w02-collection-methods-taskrows-generated.tex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
\code|Array.fill(9)(0) | & 1 & & A & skapar ny samling med en nolla tillagd i början \\ | ||
\code|Vector.fill(9)(' ')| & 2 & & B & skapar en sträng med komma mellan elementen \\ | ||
\code|xs.apply(0) | & 3 & & C & indexera i sekvenssamling; ger första elementet \\ | ||
\code|xs(0) | & 4 & & D & indexera i sekvenssamling; ger första elementet \\ | ||
\code|xs :+ 0 | & 5 & & E & skapar en sträng med alla element intill varandra \\ | ||
\code|0 +: xs | & 6 & & F & skapar ny oföränderlig sekvens med 9 blanktecken \\ | ||
\code|xs.mkString | & 7 & & G & skapar ny samling med en nolla tillagd på slutet \\ | ||
\code|xs.mkString(",") | & 8 & & H & ny samling med elementen omgjorda till heltal \\ | ||
\code|xs.map(_.toString))| & 9 & & I & skapar ny förändringsbar sekvens med 9 nollor \\ | ||
\code|xs.map(_.toInt)) | & 10 & & J & ny samling med elementen omgjorda till strängar \\ | ||
\code|val xs = Vector(2) | & 1 & & A & ny oföränderlig sekvens med blanktecken \\ | ||
\code|Array.fill(9)(0) | & 2 & & B & ny sträng med komma mellan elementen \\ | ||
\code|Vector.fill(9)(' ')| & 3 & & C & ny förändringsbar sekvens med nollor \\ | ||
\code|xs(0) | & 4 & & D & ny samling med en nolla tillagd på slutet \\ | ||
\code|xs.apply(0) | & 5 & & E & ny samling, elementen omgjorda till heltal \\ | ||
\code|xs :+ 0 | & 6 & & F & indexering, ger första elementet \\ | ||
\code|0 +: xs | & 7 & & G & ny sträng med alla element intill varandra \\ | ||
\code|xs.mkString | & 8 & & H & ny samling, elementen omgjorda till strängar \\ | ||
\code|xs.mkString(",") | & 9 & & I & förkortad skrivning av \code|apply(0)| \\ | ||
\code|xs.map(_.toString))| & 10 & & J & ny samling med en nolla tillagd i början \\ | ||
\code|xs.map(_.toInt)) | & 11 & & K & ny referens till sekvens av längd 1 \\ |
Oops, something went wrong.