Run it! · הרץ אותו!
Start here
- A lesson is a list of short steps. Press Continue (the arrow at the bottom) for the next one.
- After the steps come tasks: code you change and run.
- Today you type very little. You change one small thing at a time.
התחל כאן
- שיעור הוא רשימה של שלבים קצרים. לחץ על המשך (החץ בתחתית) לשלב הבא.
- לאחר השלבים מגיעים משימות: קוד שאתה משנה ומפעיל.
- היום אתה מקליד מעט מאוד. אתה משנה דבר קטן אחד בכל פעם.
The buttons
- Run ▶ runs the code. What it prints appears in the dark box under it.
- Check answer tests your code. Green means correct, and you win coins.
- The lightbulb gives a hint when you are stuck.
- Reset brings the starting code back.
הכפתורים
- הרץ ▶ מפעיל את הקוד. מה שהוא מדפיס מופיע בקופסה הכהה מתחת לו.
- בדיקת תשובה בודק את הקוד שלך. ירוק פירונו נכון, ואז אתה זוכה מטבעות.
- נורת החשמל נותנת רמז כשאתה נתקע.
- איפוס מחזיר את הקוד ההתחלתי.
print("I am an example. Press the play button to run me.")
When something goes wrong
- If the code has a mistake, Python stops and shows red text.
- Under the red text, a card explains the error in English and Chinese and tells you which line to look at.
- Mistakes are normal. Read the card, fix one thing, and run again.
כאשר משהו הולך לאחור
- אם יש שגיאה בקוד, Python עצור ותציג טקסט אדום.
- מתחת לטקסט האדום, כרטיס מסביר את השגיאה באנגלית ובסינית ומראה איזה שורה לבדוק.
- שגיאות הן נורמליות. קרא את הכרטיס, תיקן דבר אחד והפעל שוב.
When a program waits for you
- Some programs ask a question with
input(). - Then a highlighted box appears: type here, then press Enter.
- Click the box, type your answer and press Enter. The program continues.
כאשר תוכנית מחכה לך
- חלק מהתוכניות שואלות שאלה בעזרת
input(). - אז מופיעה קופסה מודגשת: הקלד כאן, ואז לחץ Enter.
- לחץ על הקופסה, הקלד את התשובה ולחץ על Enter. התוכנית ממשיכה.
name = input("What is your name? ")
print("Nice to meet you, " + name)
Now you try
- Three small tasks. Change the code, press Run, then Check answer.
כעת תנסו בעצמכם
- שלושה משימות קטנות. שנה את הקוד, לחץ על Run, ולאחר מכן לחץ על Check answer.
This program is switched off: the # at the start makes the line a comment, so Python skips it. Delete the #, press Run ▶ to see what it prints, then press Check answer. · התוכנית הזו כבויה: ה# בתחילת השורה הופך אותה להערות, ולכן פיתון דורש אותה. מחק את ה#, לחץ על הרץ ▶ כדי לראות מה היא מדפסת, ואז לחץ על בדוק תשובה.
Click Run to see the output here. · לחץ על הרץ כדי לראות את התוצא כאן.
Change one word so the program prints I like dogs. Only the text inside the quotes changes. · שנה מילה אחת כך שהתוכנית תדפיס את הI like dogs. רק הטקסט בתוך ההפניות משתנה.
Click Run to see the output here. · לחץ על הרץ כדי לראות את התוצא כאן.
This program has a mistake. Press Run ▶ first and read the card under the red text: it explains the error. Then fix the line so the program prints Hello. · לתוכנית הזו יש טעות. לחץ קודם כל על הרץ ▶ וקרא את הכרטיס מתחת לטקסט האדום: הוא מסביר את הטעות. לאחר מכן תקן את השורה כך שהתוכנית תדפיס את הHello.
Click Run to see the output here. · לחץ על הרץ כדי לראות את התוצא כאן.