עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

python חדש בנושא

Featured Replies

פורסם

אתמול שמעתי על שפה מאוד קלה. חיפשתי מידע עליה, אכן היא קלה מאוד.

השאלה שלי היא

אם אני רושם את התוכנית הבאה:

print "Welcome to the Area calculation program"

print "---------------------------------------"

print

# Print out the menu:

print "Please select a shape:"

print "1 Rectangle"

print "2 Circle"

# Get the user's choice:

shape = input("> ")

# Calculate the area:

if shape == 1:

height = input("Please enter the height: ")

width = input("Please enter the width: ")

area = height*width

print "The area is", area

else:

radius = input("Please enter the radius: ")

area = 3.14*(radius**2)

print "The area is", area

לאחר כל פקודת פרינט שאני רושם אז ה-IDLE מדפיס ישירות.

אני רוצה לרשום את כל התוכנית ושידפיס לי את הכל במכה.

פורסם

אני לא עבדתי ספציפית עם פייטון ככה שאני לא יודע בדיוך איך היא פועלת אבל תנסה להכניס את הכל למחרוזת ובסוף התהליך תדפיס את המחרוזת

פורסם

תכתוב את כל הקוד בנוטפד או מה שבא לך ואז תשמור בשם כלשהו אם סיומת *.py ואז תריץ את הקובץ

אני חושב שזה אמור לעבוד בהצלחה :)

פורסם
  • מחבר

לא עובד :P

  • 2 שבועות מאוחר יותר...
פורסם

ב

IDLE

יש לך אפשרות לפתוח חלון חדש, אני מאמין שהיא נמצאת ב

File --- new

בחלון הזה אתה יכול לכתוב את הקוד, לאחר מכל לשמור אותו, ואז "לקמפל". כמובן שאתה לא באמת מקמפל, אבל זה מריץ את הקוד. (פשוט לחץ על F5)

פורסם
  • מחבר

תודה

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.