זוגי או אי-זוגיEven or odd
קלטו מספר שלם והדפיסו even אם הוא זוגי ו-odd אם לא.
Read a whole number and print even if it's even, odd otherwise.
איך הפלט אמור להיראות?What should the output look like?
7 odd
if n % 2 == 0:if n % 2 == 0:נבנה על ידיBuilt by Ariel Yohimovich
if, elif, else, השוואות, and/or/not ואמת/שקר.
if, elif, else, comparisons, and/or/not and truthiness.
קלטו מספר שלם והדפיסו even אם הוא זוגי ו-odd אם לא.
Read a whole number and print even if it's even, odd otherwise.
7 odd
if n % 2 == 0:if n % 2 == 0:קלטו ציון (0-100) והדפיסו: 90+ excellent, 75-89 good, 55-74 pass, מתחת fail.
Read a score (0-100) and print: 90+ excellent, 75-89 good, 55-74 pass, below that fail.
82 good
קלטו שנה והדפיסו True אם היא מעוברת: מתחלקת ב-4, אבל לא ב-100, אלא אם היא מתחלקת ב-400.
Read a year and print True if it's a leap year: divisible by 4, but not by 100, unless divisible by 400.
2000 True
y % 4 == 0 and y % 100 != 0y % 4 == 0 and y % 100 != 0or y % 400 == 0or y % 400 == 0משתמש נכון: admin, סיסמה נכונה: py123. קלטו שם וסיסמה. אם שניהם נכונים הדפיסו welcome; אם רק השם נכון wrong password; אחרת unknown user.
Correct user: admin, password: py123. Read a name and password. If both are right print welcome; if only the name is right wrong password; otherwise unknown user.
admin abc wrong password
קלטו שם ספר, מספר עמודים ודירוג (1-5). הדפיסו <שם>: ואחריו תגית: ⭐ must read אם הדירוג 5, 📏 long אם יותר מ-500 עמודים (ודירוג פחות מ-5), אחרת 📖 regular.
Read a title, page count and rating (1-5). Print <title>: followed by a tag: ⭐ must read if rating is 5, 📏 long if over 500 pages (and rating under 5), otherwise 📖 regular.
Dune 600 4 Dune: 📏 long
קלטו שלוש צלעות. אם הן לא יכולות ליצור משולש (צלע אחת ≥ סכום שתי האחרות) הדפיסו invalid. אחרת: equilateral (שלוש שוות), isosceles (שתיים), scalene (אף אחת).
Read three sides. If they can't form a triangle (one side ≥ the sum of the other two) print invalid. Otherwise: equilateral (all equal), isosceles (two), scalene (none).
5 5 8 isosceles
a == b == c לשלוש שוות.a == b == c for all equal.a == b or b == c or a == c לשתיים.a == b or b == c or a == c for two.קלטו שתי בחירות (rock / paper / scissors) של שחקן 1 ושחקן 2. הדפיסו tie, player 1 או player 2 לפי המנצח.
Read two choices (rock / paper / scissors) for player 1 and player 2. Print tie, player 1 or player 2 for the winner.
Rock paper player 2
נבנה על ידיBuilt by Ariel Yohimovich