LESSON 01 OF 52 · CHAPTER 01
Hello
print displays a string
01-hello.srp
// My first Scarp program
print("Hello from Scarp!");
stdout
Hello from Scarp!
Write what you expect this program to print. Check prediction for a line-level hint without revealing the answer, or reveal the verified output when ready. This checks displayed text only; it does not run Scarp or save your input.
UNDERSTAND THE CODE
Explanation & practice
What this example teaches
print displays a string
Expected behavior
Hello from Scarp!
Practice: Read the source before looking at the output. Predict the values and their order, then use the pinned compiler to execute this lesson and compare the exact fixture. Identify which operation produces the result.
पहला Scarp प्रोग्राम
print किसी टेक्स्ट को स्क्रीन पर प्रदर्शित करता है। यह सबसे छोटा चलने वाला उदाहरण है।
अभ्यास: स्रोत खोलकर बताइए कि कितनी पंक्तियाँ प्रदर्शित होंगी।
Explanations are sourced from the project's English chapter guide and हिन्दी अध्याय. The Scarp program and output are unchanged.
SOURCE-BACKED SELF-CHECK · स्रोत-आधारित अभ्यास
Quick checkpoint / त्वरित अभ्यास
What exact text does this first program print?यह पहला प्रोग्राम ठीक कौन-सा टेक्स्ट प्रिंट करता है?
Reveal the source-backed answer / सही उत्तर देखें
Hello from Scarp! — The source calls print with the string literal "Hello from Scarp!", so the fixture contains that line.Hello from Scarp! — स्रोत में print को "Hello from Scarp!" स्ट्रिंग दी गई है, इसलिए अपेक्षित आउटपुट में यही पंक्ति है।
This question checks understanding of a recorded compiler output. It does not run Scarp in the browser. यह प्रश्न सत्यापित आउटपुट पर आधारित है; ब्राउज़र में Scarp नहीं चलता।
LEARNING PROGRESS
Keep your place
Mark this lesson complete when you are ready.
Only saved in this browser. No account or tracking.
TRY IT LOCALLY
Verify, then execute
Use the pinned compiler from the course root. Keep any imported _support files next to the source.
scarp verify examples/01-basics/01-hello.srp
scarp exec examples/01-basics/01-hello.srpThe website does not run code. Read the CLI guide ↗
Pinned compiler: Scarp v0.0.6-alpha.3
· ceff07d9014f. No simulated output.