מפגשSession 1: מה זה תכנות? התקנה וטרמינלWhat is programming? Setup & terminal
- תוכנית היא רשימת הוראות שמתבצעות לפי הסדר, מלמעלה למטה.A program is a list of instructions that run in order, top to bottom.
- המפרש של Python קורא את הקוד ומבצע אותו שורה אחרי שורה.Python's interpreter reads the code and runs it line by line.
- Windows: מסמנים Add to PATH ומריצים
python. Mac: מריציםpython3.Windows: tick Add to PATH and runpython. Mac: runpython3. - טרמינל:
pwd,ls/dir,cd,cd ..,mkdir.Terminal:pwd,ls/dir,cd,cd ..,mkdir. printמציגה ערכים. טקסט במירכאות, חישובים בלי. פסיק מפריד בין ערכים.printshows values. Text in quotes, calculations without. A comma separates values.- אופרטורים:
+ - * /וגם//(חילוק שלם),%(שארית),**(חזקה).Operators:+ - * /plus//(whole division),%(remainder),**(power). #מתחיל הערה. רווח בתחילת שורה הוא שגיאה (בינתיים).#starts a comment. A leading space is an error (for now).- קוראים שגיאה מלמטה: סוג → שורה → מה שונה ממה שהתכוונתי.Read an error from the bottom: type → line → what differs from what I meant.