Skip to content

Commit 4a1e0d9

Browse files
committed
Reduced by 17 lines
1 parent f91cb59 commit 4a1e0d9

1 file changed

Lines changed: 18 additions & 36 deletions

File tree

lib/utils/my_exercises.dart

Lines changed: 18 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -7,60 +7,52 @@ class MyExercises {
77
ExerciseDatamodell(
88
name: "Message Length Analyzer",
99
description: "Basic string processing.",
10-
task: "A system receives the identifier string \"HelloWorld\". "
11-
"Determine how many characters this identifier contains and output the number.",
10+
task: "A system receives the identifier string \"HelloWorld\". Determine how many characters this identifier contains and output the number.",
1211
solution: "10",
1312
difficultyLevel: 0,
1413
),
15-
1614
// Difficulty Level 1
1715
ExerciseDatamodell(
1816
name: "Energy Pulse Calculation",
1917
description: "A basic mathematical operation involving exponentiation.",
20-
task: "In a physics simulation, a small energy pulse has an intensity of 12 units. "
21-
"The total energy released is defined as the square of this intensity. "
22-
"Calculate and output the resulting energy value.",
18+
task: "In a physics simulation, a small energy pulse has an intensity of 12 units. The total energy released "
19+
"is defined as the square of this intensity. Calculate and output the resulting energy value.",
2320
solution: "144",
2421
difficultyLevel: 1,
2522
hint: "You only need to multiply the number by itself.",
2623
),
2724
ExerciseDatamodell(
2825
name: "Character Encoding Lookup",
2926
description: "Understanding ASCII encoding.",
30-
task: "In a low-level communication protocol, the character 'A' is transmitted. "
31-
"Determine the ASCII value of 'A' and output it.",
27+
task: "In a low-level communication protocol, the character 'A' is transmitted. Determine the ASCII value of 'A' and output it.",
3228
solution: "65",
3329
difficultyLevel: 1,
3430
),
35-
3631
// Difficulty Level 2
3732
ExerciseDatamodell(
3833
name: "Accumulated Workload",
3934
description: "Summation of a numerical series.",
40-
task: "A researcher records daily workload values from day 1 to day 50. "
41-
"Calculate the sum of all integers from 1 to 50 and output the result.",
35+
task: "A researcher records daily workload values from day 1 to day 50. Calculate the sum of all integers from 1 to 50 and output the result.",
4236
solution: "1275",
4337
difficultyLevel: 2,
4438
hint: "A loop or a mathematical formula can help you sum consecutive numbers.",
4539
),
4640
ExerciseDatamodell(
4741
name: "Sensor Data Averaging",
4842
description: "Working with multiple fixed numeric values.",
49-
task: "A measurement device produced the readings: 4, 18, 22, 9, and 17. "
50-
"Compute the average of these five values and output the result as a whole number.",
43+
task: "A measurement device produced the readings: 4, 18, 22, 9, and 17. Compute the average of these five values and output the "
44+
"result as a whole number.",
5145
solution: "14",
5246
difficultyLevel: 2,
5347
),
5448
ExerciseDatamodell(
5549
name: "Weather Station Conversion",
5650
description: "Applying a temperature conversion formula.",
57-
task: "A weather station reports a temperature of 68°F. "
58-
"Convert this value to Celsius using the standard formula and output the whole-number result.",
51+
task: "A weather station reports a temperature of 68°F. Convert this value to Celsius using the standard formula and output the whole-number result.",
5952
solution: "20",
6053
difficultyLevel: 2,
6154
hint: "Use the formula: (°F - 32) × 5/9.",
6255
),
63-
6456
// Difficulty Level 3
6557
ExerciseDatamodell(
6658
name: "Circular Field Area",
@@ -73,27 +65,23 @@ class MyExercises {
7365
ExerciseDatamodell(
7466
name: "Fibonacci Growth Model",
7567
description: "Working with a classical recursive sequence.",
76-
task: "A biological growth model follows the Fibonacci sequence, starting with 0 and 1. "
77-
"Determine the 10th Fibonacci number and output it.",
68+
task: "A biological growth model follows the Fibonacci sequence, starting with 0 and 1. Determine the 10th Fibonacci number and output it.",
7869
solution: "55",
7970
difficultyLevel: 3,
8071
hint: "Each number is the sum of the previous two.",
8172
),
82-
8373
// Difficulty Level 4
8474
ExerciseDatamodell(
8575
name: "Prime Distribution Analysis",
8676
description: "Algorithmic reasoning with number theory.",
87-
task: "A mathematical model requires knowing how many prime numbers exist between 1 and 30. "
88-
"Count all primes in this range and output the total.",
77+
task: "A mathematical model requires knowing how many prime numbers exist between 1 and 30. Count all primes in this range and output the total.",
8978
solution: "10",
9079
difficultyLevel: 4,
9180
),
9281
ExerciseDatamodell(
9382
name: "Matrix Diagnostic Scan",
9483
description: "Working with two-dimensional data structures.",
95-
task: "A diagnostic system stores sensor readings in a 3×3 matrix: "
96-
"[[2,3,1],[4,5,6],[7,8,9]]. "
84+
task: "A diagnostic system stores sensor readings in a 3×3 matrix: [[2,3,1],[4,5,6],[7,8,9]]. "
9785
"Calculate the sum of the main diagonal elements and output the result.",
9886
solution: "16",
9987
difficultyLevel: 4,
@@ -102,13 +90,11 @@ class MyExercises {
10290
ExerciseDatamodell(
10391
name: "Array Rotation Mechanism",
10492
description: "Array manipulation and index shifting.",
105-
task: "Rotate the array [1, 2, 3, 4, 5, 6] three positions to the right. "
106-
"Output the resulting array as a comma-separated string.",
93+
task: "Rotate the array [1, 2, 3, 4, 5, 6] three positions to the right. Output the resulting array as a comma-separated string.",
10794
solution: "4,5,6,1,2,3",
10895
difficultyLevel: 4,
10996
hint: "Elements moved off the end reappear at the beginning.",
11097
),
111-
11298
// Difficulty Level 5
11399
ExerciseDatamodell(
114100
name: "Encrypted Transmission Decoder",
@@ -122,9 +108,8 @@ class MyExercises {
122108
ExerciseDatamodell(
123109
name: "Lexicographical Sort Engine",
124110
description: "Implementing a sorting algorithm without built-in sort functions.",
125-
task: "A dataset contains the words: [\"zebra\", \"apple\", \"moon\", \"delta\", \"car\"]. "
126-
"Sort these words in ascending lexicographical order using your own sorting logic and output them "
127-
"as a single comma-separated string.",
111+
task: "A dataset contains the words: [\"zebra\", \"apple\", \"moon\", \"delta\", \"car\"]. Sort these words in ascending lexicographical "
112+
"order using your own sorting logic and output them as a single comma-separated string.",
128113
solution: "apple,car,delta,moon,zebra",
129114
difficultyLevel: 5,
130115
hint: "Compare strings character by character, similar to dictionary order.",
@@ -140,20 +125,17 @@ class MyExercises {
140125
ExerciseDatamodell(
141126
name: "Binary Search Simulation",
142127
description: "Simulating a binary search on a fixed dataset.",
143-
task: "You are given the sorted array [3, 8, 15, 23, 42, 56, 78, 91]. "
144-
"Simulate a binary search for the value 42 and output the index where it is found. "
145-
"Use zero-based indexing.",
128+
task: "You are given the sorted array [3, 8, 15, 23, 42, 56, 78, 91]. Simulate a binary search for the value 42 and "
129+
"output the index where it is found. Use zero-based indexing.",
146130
solution: "4",
147131
difficultyLevel: 5,
148132
hint: "Binary search repeatedly halves the search interval.",
149133
),
150134
ExerciseDatamodell(
151135
name: "Checksum Validator",
152136
description: "A weighted summation task for validating numeric codes.",
153-
task: "A device generates the identification code \"57281\". "
154-
"Compute the checksum by multiplying each digit by its 1-based index "
155-
"(first digit × 1, second digit × 2, ...). "
156-
"Sum all products and output the checksum.",
137+
task: "A device generates the identification code \"57281\". Compute the checksum by multiplying each digit by its 1-based index "
138+
"(first digit × 1, second digit × 2, ...). Sum all products and output the checksum.",
157139
solution: "62",
158140
difficultyLevel: 5,
159141
),

0 commit comments

Comments
 (0)