נבנה על ידיBuilt by Ariel Yohimovich

PythonPython
2
חלקPart 1: יסודותFoundations כ-3 שעות (כולל הפסקה)About 3 hours (with a break)

משתנים, print ו-inputVariables, print & input

משתנים כתוויות על ערכים, קלט מהמשתמש, f-strings ראשונים.

Variables as labels on values, user input, first f-strings.

נסו לפתור לבד לפני שמציצים. בנגן: חיצים במקלדת או הכפתורים. כל צעד מראה איפה (קובץ ושורה), מה כותבים ולמה.Try on your own before peeking. In the player use the arrow keys or the buttons. Each step shows where (file and line), what to write, and why.
תרגילExercise 1

ברכה אישיתPersonal greeting

תזכורת: מה ביקשוReminder: the task

קלטו שם עם input והדפיסו שלום, <שם>! (באנגלית: Hello, <name>!). השתמשו ב-f-string.

Read a name with input and print Hello, <name>!. Use an f-string.

סרטון מונפש: על מה לוחצים, מה כותבים ולמה, צעד אחר צעד.An animated movie: what to click, what to type and why, step by step.
איפהWhere
מהWhat
למהWhy
הפתרון המלא והפלט שלוFull solution and its output
main.py
name = input("מה שמך? ")
print(f"שלום, {name}!")
name = input("Your name? ")
print(f"Hello, {name}!")
פלטOutput
מה שמך? Dana
שלום, Dana!
Your name? Dana
Hello, Dana!

יש יותר מדרך נכונה אחת. אם הפלט שלכם זהה, גם הפתרון שלכם נכון.There is more than one right way. If your output matches, your solution is right too.

תרגילExercise 2

החלפת ערכיםSwap values

תזכורת: מה ביקשוReminder: the task

נתונים a = 7 ו-b = 3. החליפו ביניהם כך שבסוף a הוא 3 ו-b הוא 7, והדפיסו את שניהם.

Given a = 7 and b = 3, swap them so that a is 3 and b is 7, then print both.

סרטון מונפש: על מה לוחצים, מה כותבים ולמה, צעד אחר צעד.An animated movie: what to click, what to type and why, step by step.
איפהWhere
מהWhat
למהWhy
הפתרון המלא והפלט שלוFull solution and its output
main.py
a = 7
b = 3
a, b = b, a
print(a, b)
פלטOutput
3 7

יש יותר מדרך נכונה אחת. אם הפלט שלכם זהה, גם הפתרון שלכם נכון.There is more than one right way. If your output matches, your solution is right too.

תרגילExercise 3

כרטיס היכרותIntro card

תזכורת: מה ביקשוReminder: the task

קלטו שם ועיר (שתי שאלות), והדפיסו שתי שורות: שם: ... ו-עיר: ....

Read a name and a city (two questions) and print two lines: Name: ... and City: ....

סרטון מונפש: על מה לוחצים, מה כותבים ולמה, צעד אחר צעד.An animated movie: what to click, what to type and why, step by step.
איפהWhere
מהWhat
למהWhy
הפתרון המלא והפלט שלוFull solution and its output
main.py
name = input("שם: ")
city = input("עיר: ")
print(f"שם: {name}")
print(f"עיר: {city}")
name = input("Name: ")
city = input("City: ")
print(f"Name: {name}")
print(f"City: {city}")
פלטOutput
שם: Noa
עיר: Eilat
שם: Noa
עיר: Eilat
Name: Noa
City: Eilat
Name: Noa
City: Eilat

יש יותר מדרך נכונה אחת. אם הפלט שלכם זהה, גם הפתרון שלכם נכון.There is more than one right way. If your output matches, your solution is right too.

תרגילExercise 4

תאריך עם sepA date with sep

תזכורת: מה ביקשוReminder: the task

משתנים day = 19, month = 11, year = 2026. הדפיסו בשורה אחת 19/11/2026 בעזרת sep, בלי לכתוב / בתוך מחרוזת אחרת.

Variables day = 19, month = 11, year = 2026. Print 19/11/2026 on one line using sep, without writing / in any other string.

סרטון מונפש: על מה לוחצים, מה כותבים ולמה, צעד אחר צעד.An animated movie: what to click, what to type and why, step by step.
איפהWhere
מהWhat
למהWhy
הפתרון המלא והפלט שלוFull solution and its output
main.py
day = 19
month = 11
year = 2026
print(day, month, year, sep="/")
פלטOutput
19/11/2026

יש יותר מדרך נכונה אחת. אם הפלט שלכם זהה, גם הפתרון שלכם נכון.There is more than one right way. If your output matches, your solution is right too.

תרגילExercise 5

מדף, צעד 2: ספר מהמשתמשShelf, step 2: a book from the user

תזכורת: מה ביקשוReminder: the task

שאלו את המשתמש על שם ספר ועל המחבר, והדפיסו כרטיס: קו, 📚 <שם>, ✍️ <מחבר>, קו. שמרו כל ערך במשתנה עם שם טוב.

Ask the user for a book title and author, and print a card: a line, 📚 <title>, ✍️ <author>, a line. Keep each value in a well-named variable.

סרטון מונפש: על מה לוחצים, מה כותבים ולמה, צעד אחר צעד.An animated movie: what to click, what to type and why, step by step.
איפהWhere
מהWhat
למהWhy
הפתרון המלא והפלט שלוFull solution and its output
shelf.py
title = input("שם הספר: ")
author = input("מחבר: ")
print("--------------------")
print(f"📚 {title}")
print(f"✍️ {author}")
print("--------------------")
title = input("Book title: ")
author = input("Author: ")
print("--------------------")
print(f"📚 {title}")
print(f"✍️ {author}")
print("--------------------")
פלטOutput
שם הספר: Dune
מחבר: Frank Herbert
--------------------
📚 Dune
✍️ Frank Herbert
--------------------
Book title: Dune
Author: Frank Herbert
--------------------
📚 Dune
✍️ Frank Herbert
--------------------

יש יותר מדרך נכונה אחת. אם הפלט שלכם זהה, גם הפתרון שלכם נכון.There is more than one right way. If your output matches, your solution is right too.

אתגרChallenge 1

סיפור משוגעMad-libs story

תזכורת: מה ביקשוReminder: the task

קלטו שלוש מילים: חיה, צבע, מקום. הדפיסו משפט אחד שמשלב את שלושתן בסדר הזה, למשל ראיתי זברה סגולה בירושלים.

Read three words: an animal, a colour, a place. Print one sentence using all three in that order, e.g. I saw a purple zebra in Paris.

סרטון מונפש: על מה לוחצים, מה כותבים ולמה, צעד אחר צעד.An animated movie: what to click, what to type and why, step by step.
איפהWhere
מהWhat
למהWhy
הפתרון המלא והפלט שלוFull solution and its output
main.py
animal = input("חיה: ")
color = input("צבע: ")
place = input("מקום: ")
print(f"ראיתי {animal} {color} ב-{place}")
animal = input("Animal: ")
color = input("Colour: ")
place = input("Place: ")
print(f"I saw a {animal} {color} in {place}")
פלטOutput
חיה: zebra
צבע: purple
מקום: Paris
ראיתי zebra purple ב-Paris
Animal: zebra
Colour: purple
Place: Paris
I saw a zebra purple in Paris

יש יותר מדרך נכונה אחת. אם הפלט שלכם זהה, גם הפתרון שלכם נכון.There is more than one right way. If your output matches, your solution is right too.

אתגרChallenge 2

סיבוב שלושהRotate three

תזכורת: מה ביקשוReminder: the task

a, b, c = 1, 2, 3. בשורה אחת בלבד, סובבו כך ש-a יקבל את הערך של b, b של c ו-c של a. הדפיסו 2 3 1.

a, b, c = 1, 2, 3. In a single line, rotate so a gets b's value, b gets c's and c gets a's. Print 2 3 1.

סרטון מונפש: על מה לוחצים, מה כותבים ולמה, צעד אחר צעד.An animated movie: what to click, what to type and why, step by step.
איפהWhere
מהWhat
למהWhy
הפתרון המלא והפלט שלוFull solution and its output
main.py
a, b, c = 1, 2, 3
a, b, c = b, c, a
print(a, b, c)
פלטOutput
2 3 1

יש יותר מדרך נכונה אחת. אם הפלט שלכם זהה, גם הפתרון שלכם נכון.There is more than one right way. If your output matches, your solution is right too.

נבנה על ידיBuilt by Ariel Yohimovich