CHAPTER 04 · 12 LESSONS
04 · Numeric collections and types
Scope: the current compiler offers specialised numeric vectors, integer collections and matrix/tile operations, not a general-purpose list/map/set library.
YOUR CHAPTER PROGRESS
0 of 12 completedSaved only in this browser. No account or tracking.
YOUR CHAPTER LEARNING PATH · सीखने का क्रम
Read. Check. Build.
Three linked steps using real Scarp source and verified output.
-
Read the lessons · पाठ पढ़ें
Work through all 12 verified examples. Save optional local lesson progress as you learn; this does not certify code execution.
Start with Vectors ↗Lesson tracking is optional and only available when browser storage works.
-
Check understanding · समझ जाँचें
Try 3 bilingual questions linked directly to their original source and expected output. No quiz score is stored.
Review all three questions here · यहाँ अभ्यास करें ↓ -
Write Scarp · कोड लिखें
Edit the real starter locally, compare output with the compiler-verified goal, and use the hint or tested solution when needed.
Open Average a vector lab ↗
Lesson completion is voluntary local tracking. Passing a quiz or lab is not automatically recorded or claimed by this website. The Scarp compiler runs locally, not in your browser.
Lessons in this chapter
Practice this chapter · इस अध्याय का अभ्यास करें 3 bilingual, compiler-evidenced questions
Answer all three questions using the checked-in lessons. Feedback runs only in your browser; there is no stored score, automatic lesson completion or Scarp execution. Answers remain readable without JavaScript.
Question 1 of 3 · Vectors · View source and recorded output ↗
SOURCE-BACKED SELF-CHECK · स्रोत-आधारित अभ्यास
Quick checkpoint / त्वरित अभ्यास
What mean does mean(values) print for [1.0, 2.0, 3.0, 4.0]?[1.0, 2.0, 3.0, 4.0] के लिए mean(values) क्या प्रिंट करता है?
Reveal the source-backed answer / सही उत्तर देखें
2.5 — The four values sum to 10.0. Dividing by their count (4) gives a mean of 2.5.2.5 — चार संख्याओं का योग 10.0 है। 10.0 को 4 से भाग देने पर औसत 2.5 मिलता है।
This question checks understanding of a recorded compiler output. It does not run Scarp in the browser. यह प्रश्न सत्यापित आउटपुट पर आधारित है; ब्राउज़र में Scarp नहीं चलता।
Question 2 of 3 · Vector Windows · View source and recorded output ↗
SOURCE-BACKED SELF-CHECK · स्रोत-आधारित अभ्यास
Quick checkpoint / त्वरित अभ्यास
Which values are printed for window(values, 1, 2)?window(values, 1, 2) के लिए कौन-से मान प्रिंट होते हैं?
Reveal the source-backed answer / सही उत्तर देखें
[20.0, 30.0] — Starting at index 1 selects the second and third values of [10.0, 20.0, 30.0, 40.0].[20.0, 30.0] — index 1 से शुरू करने पर [10.0, 20.0, 30.0, 40.0] में दूसरे और तीसरे मान चुने जाते हैं।
This question checks understanding of a recorded compiler output. It does not run Scarp in the browser. यह प्रश्न सत्यापित आउटपुट पर आधारित है; ब्राउज़र में Scarp नहीं चलता।
Question 3 of 3 · Integer Collections · View source and recorded output ↗
SOURCE-BACKED SELF-CHECK · स्रोत-आधारित अभ्यास
Quick checkpoint / त्वरित अभ्यास
What total is produced by summing the integer window [2, 3, 4]?integer window [2, 3, 4] का योग कितना होता है?
Reveal the source-backed answer / सही उत्तर देखें
9 — ints_window selects 2, 3 and 4, and the repeat loop adds these three integers to obtain 9.9 — ints_window से 2, 3 और 4 चुने जाते हैं। repeat लूप इन्हें जोड़कर 9 प्राप्त करता है।
This question checks understanding of a recorded compiler output. It does not run Scarp in the browser. यह प्रश्न सत्यापित आउटपुट पर आधारित है; ब्राउज़र में Scarp नहीं चलता।
All examples are validated with Scarp v0.0.6-alpha.3. Each lesson has its own code and expected-output page.