Как писать функции Python

| | | | | | |

–§—É–Ω–∫—Ü–∏—è Python - —ç—Ç–æ –≥—Ä—É–ø–ø–∞ –∫–æ–¥–∞. –ß—Ç–æ–±—ã –∑–∞–ø—É—Å—Ç–∏—Ç—å –∫–æ–¥ –≤ —Ñ—É–Ω–∫—Ü–∏–∏, –≤—ã –¥–æ–ª–∂–Ω—ã –≤—ã–∑–≤–∞—Ç—å —Ñ—É–Ω–∫—Ü–∏—é. –§—É–Ω–∫—Ü–∏—è –º–æ–∂–µ—Ç –±—ã—Ç—å –≤—ã–∑–≤–∞–Ω–∞ –∏–∑ –ª—é–±–æ–≥–æ –º–µ—Å—Ç–∞ –ø–æ—Å–ª–µ –æ–ø—Ä–µ–¥–µ–ª–µ–Ω–∏—è —Ñ—É–Ω–∫—Ü–∏–∏. –§—É–Ω–∫—Ü–∏–∏ –º–æ–≥—É—Ç –≤–æ–∑–≤—Ä–∞—â–∞—Ç—å –∑–Ω–∞—á–µ–Ω–∏–µ —Å –ø–æ–º–æ—â—å—é –æ–ø–µ—Ä–∞—Ç–æ—Ä–∞ return.

–§—É–Ω–∫—Ü–∏–∏ - —ç—Ç–æ –æ–±—â–∞—è —á–µ—Ä—Ç–∞ –¥–ª—è –≤—Å–µ—Ö —è–∑—ã–∫–æ–≤ –ø—Ä–æ–≥—Ä–∞–º–º–∏—Ä–æ–≤–∞–Ω–∏—è. –û–Ω–∏ –ø–æ–∑–≤–æ–ª—è—é—Ç —Ä–∞–∑—Ä–∞–±–æ—Ç—á–∏–∫–∞–º –ø–∏—Å–∞—Ç—å –±–ª–æ–∫–∏ –∫–æ–¥–∞, –∫–æ—Ç–æ—Ä—ã–µ –≤—ã–ø–æ–ª–Ω—è—é—Ç –æ–ø—Ä–µ–¥–µ–ª–µ–Ω–Ω—ã–µ –∑–∞–¥–∞—á–∏. –§—É–Ω–∫—Ü–∏—è –º–æ–∂–µ—Ç –≤—ã–ø–æ–ª–Ω—è—Ç—å—Å—è —Å—Ç–æ–ª—å–∫–æ —Ä–∞–∑, —Å–∫–æ–ª—å–∫–æ —Ö–æ—á–µ—Ç —Ä–∞–∑—Ä–∞–±–æ—Ç—á–∏–∫ –≤ —Å–≤–æ–µ–º –∫–æ–¥–µ.

–§—É–Ω–∫—Ü–∏–∏ –ø–æ–∑–≤–æ–ª—è—é—Ç —Ä–∞–∑—Ä–∞–±–æ—Ç—á–∏–∫–∞–º —É–º–µ–Ω—å—à–∏—Ç—å –∫–æ–ª–∏—á–µ—Å—Ç–≤–æ –ø–æ–≤—Ç–æ—Ä–µ–Ω–∏–π –≤ —Å–≤–æ–µ–º –∫–æ–¥–µ, –ø–æ—Å–∫–æ–ª—å–∫—É –æ–Ω–∏ –º–æ–≥—É—Ç –≤—ã–ø–æ–ª–Ω—è—Ç—å –æ–¥–∏–Ω –∏ —Ç–æ—Ç –∂–µ –±–ª–æ–∫ –∫–æ–¥–∞ –Ω–µ—Å–∫–æ–ª—å–∫–æ —Ä–∞–∑ –≤ –æ–¥–Ω–æ–π –ø—Ä–æ–≥—Ä–∞–º–º–µ.

–í —ç—Ç–æ–º —Ä—É–∫–æ–≤–æ–¥—Å—Ç–≤–µ —Å –ø—Ä–∏–º–µ—Ä–∞–º–∏ –æ–±—Å—É–∂–¥–∞—é—Ç—Å—è –æ—Å–Ω–æ–≤—ã —Ñ—É–Ω–∫—Ü–∏–π Python, –∫–∞–∫ —Å–æ–∑–¥–∞–≤–∞—Ç—å –∏ –≤—ã–∑—ã–≤–∞—Ç—å —Ñ—É–Ω–∫—Ü–∏—é –∏ –∫–∞–∫ —Ä–∞–±–æ—Ç–∞—Ç—å —Å –∞—Ä–≥—É–º–µ–Ω—Ç–∞–º–∏. –ö –∫–æ–Ω—Ü—É —á—Ç–µ–Ω–∏—è —ç—Ç–æ–≥–æ —Ä—É–∫–æ–≤–æ–¥—Å—Ç–≤–∞ –≤—ã —Å—Ç–∞–Ω–µ—Ç–µ —ç–∫—Å–ø–µ—Ä—Ç–æ–º –≤ –Ω–∞–ø–∏—Å–∞–Ω–∏–∏ —Ñ—É–Ω–∫—Ü–∏–π –Ω–∞ Python.

–ß—Ç–æ —Ç–∞–∫–æ–µ —Ñ—É–Ω–∫—Ü–∏—è Python?

–§—É–Ω–∫—Ü–∏—è - —ç—Ç–æ –±–ª–æ–∫ –∫–æ–¥–∞, –∫–æ—Ç–æ—Ä—ã–π —Ç–æ–ª—å–∫–æ –∑–∞–ø—É—Å–∫–∞–µ—Ç—Å—è –∫–æ–≥–¥–∞ —ç—Ç–æ –Ω–∞–∑—ã–≤–∞–µ—Ç—Å—è. –§—É–Ω–∫—Ü–∏–∏ Python –≤–æ–∑–≤—Ä–∞—â–∞—é—Ç –∑–Ω–∞—á–µ–Ω–∏–µ —Å –ø–æ–º–æ—â—å—é –æ–ø–µ—Ä–∞—Ç–æ—Ä–∞ return, –µ—Å–ª–∏ –æ–Ω —É–∫–∞–∑–∞–Ω. –§—É–Ω–∫—Ü–∏—è –º–æ–∂–µ—Ç –±—ã—Ç—å –≤—ã–∑–≤–∞–Ω–∞ –≤ –ª—é–±–æ–º –º–µ—Å—Ç–µ –ø–æ—Å–ª–µ –æ–±—ä—è–≤–ª–µ–Ω–∏—è —Ñ—É–Ω–∫—Ü–∏–∏.

–°–∞–º–∞ –ø–æ —Å–µ–±–µ —Ñ—É–Ω–∫—Ü–∏—è –Ω–∏—á–µ–≥–æ –Ω–µ –¥–µ–ª–∞–µ—Ç. –ù–æ –∫–æ–≥–¥–∞ –≤–∞–º –Ω—É–∂–Ω–æ –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å —Ñ—É–Ω–∫—Ü–∏—é, –≤—ã –º–æ–∂–µ—Ç–µ –≤—ã–∑–≤–∞—Ç—å –µ–µ, –∏ –∫–æ–¥ –≤–Ω—É—Ç—Ä–∏ —Ñ—É–Ω–∫—Ü–∏–∏ –±—É–¥–µ—Ç –≤—ã–ø–æ–ª–Ω–µ–Ω.

–í Python –µ—Å—Ç—å –¥–≤–∞ —Ç–∏–ø–∞ —Ñ—É–Ω–∫—Ü–∏–π: –æ–ø—Ä–µ–¥–µ–ª—è–µ–º—ã–µ –ø–æ–ª—å–∑–æ–≤–∞—Ç–µ–ª–µ–º –∏ –≤—Å—Ç—Ä–æ–µ–Ω–Ω—ã–µ. –í—Å—Ç—Ä–æ–µ–Ω–Ω—ã–µ —Ñ—É–Ω–∫—Ü–∏–∏ - —ç—Ç–æ —Ç–∞–∫–∏–µ —Ñ—É–Ω–∫—Ü–∏–∏, –∫–∞–∫:

  • print (), –∫–æ—Ç–æ—Ä—ã–π –≤—ã–≤–æ–¥–∏—Ç –∏–Ω—Å—Ç—Ä—É–∫—Ü–∏—é –Ω–∞ –∫–æ–Ω—Å–æ–ª—å.
  • Python len () , –∫–æ—Ç–æ—Ä—ã–π –≤—ã—á–∏—Å–ª—è–µ—Ç –¥–ª–∏–Ω—É —Å–ø–∏—Å–∫–∞.
  • Python str (), –∫–æ—Ç–æ—Ä—ã–π –ø—Ä–µ–æ–±—Ä–∞–∑—É–µ—Ç –∑–Ω–∞—á–µ–Ω–∏–µ –≤ —Å—Ç—Ä–æ–∫—É

–ü–æ–ª—å–∑–æ–≤–∞—Ç–µ–ª—å—Å–∫–∏–µ —Ñ—É–Ω–∫—Ü–∏–∏ - —ç—Ç–æ –º–Ω–æ–≥–æ–∫—Ä–∞—Ç–Ω–æ –∏—Å–ø–æ–ª—å–∑—É–µ–º—ã–µ –±–ª–æ–∫–∏ –∫–æ–¥–∞, –Ω–∞–ø–∏—Å–∞–Ω–Ω—ã–µ –≤–∞–º–∏, —Ä–∞–∑—Ä–∞–±–æ—Ç—á–∏–∫–æ–º. –≠—Ç–∏ –±–ª–æ–∫–∏ –∫–æ–¥–∞ –ø–æ–∑–≤–æ–ª—è—é—Ç –±–æ–ª–µ–µ —ç—Ñ—Ñ–µ–∫—Ç–∏–≤–Ω–æ –æ—Ä–≥–∞–Ω–∏–∑–æ–≤–∞—Ç—å –≤–∞—à –∫–æ–¥. –≠—Ç–æ –≤–∞–∂–Ω–æ, –ø–æ—Ç–æ–º—É —á—Ç–æ —á–µ–º –±–æ–ª–µ–µ –æ—Ä–≥–∞–Ω–∏–∑–æ–≤–∞–Ω –≤–∞—à –∫–æ–¥, —Ç–µ–º –ø—Ä–æ—â–µ –µ–≥–æ –±—É–¥–µ—Ç –ø–æ–¥–¥–µ—Ä–∂–∏–≤–∞—Ç—å.

81% —É—á–∞—Å—Ç–Ω–∏–∫–æ–≤ –∑–∞—è–≤–∏–ª–∏, —á—Ç–æ –æ–Ω–∏ –ø–æ—á—É–≤—Å—Ç–≤–æ–≤–∞–ª–∏ —Å–µ–±—è –±–æ–ª–µ–µ —É–≤–µ—Ä–µ–Ω–Ω—ã–º–∏ –≤ —Å–≤–æ–∏—Ö –ø–µ—Ä—Å–ø–µ–∫—Ç–∏–≤–∞—Ö —Ä–∞–±–æ—Ç—ã –≤ —Ç–µ—Ö–Ω–∏—á–µ—Å–∫–∏—Ö —Å–ø–µ—Ü–∏–∞–ª–∏—Å—Ç–∞—Ö –ø–æ—Å–ª–µ –ø–æ—Å–µ—â–µ–Ω–∏—è —É—á–µ–±–Ω–æ–≥–æ –∫—É—Ä—Å–∞. –ù–∞–π–¥–∏—Ç–µ –ø–æ–¥—Ö–æ–¥ –∫ —É—á–µ–±–Ω–æ–º—É –ª–∞–≥–µ—Ä—é —Å–µ–≥–æ–¥–Ω—è.

–°—Ä–µ–¥–Ω–∏–π –≤—ã–ø—É—Å–∫–Ω–∏–∫ —É—á–µ–±–Ω–æ–≥–æ –ª–∞–≥–µ—Ä—è –ø–æ—Ç—Ä–∞—Ç–∏–ª –º–µ–Ω–µ–µ —à–µ—Å—Ç–∏ –º–µ—Å—è—Ü–µ–≤ –Ω–∞ –ø–µ—Ä–µ—Ö–æ–¥–Ω—É—é –∫–∞—Ä—å–µ—Ä—É, –æ—Ç –Ω–∞—á–∞–ª–∞ —É—á–µ–±–Ω–æ–≥–æ –ª–∞–≥–µ—Ä—è –¥–æ –ø–æ–∏—Å–∫–∞ —Å–≤–æ–µ–π –ø–µ—Ä–≤–æ–π —Ä–∞–±–æ—Ç—ã.

–û–ø—Ä–µ–¥–µ–ª–µ–Ω–∏–µ —Ñ—É–Ω–∫—Ü–∏–∏ –æ–∑–Ω–∞—á–∞–µ—Ç —Å–æ–∑–¥–∞–Ω–∏–µ —Ñ—É–Ω–∫—Ü–∏—è. –≠—Ç–æ –≤–∫–ª—é—á–∞–µ—Ç –≤ —Å–µ–±—è –Ω–∞–ø–∏—Å–∞–Ω–∏–µ –±–ª–æ–∫–∞ –∫–æ–¥–∞, –∫–æ—Ç–æ—Ä—ã–π –º—ã –º–æ–∂–µ–º –≤—ã–∑—ã–≤–∞—Ç—å, —Å—Å—ã–ª–∞—è—Å—å –Ω–∞ –∏–º—è –Ω–∞—à–µ–π —Ñ—É–Ω–∫—Ü–∏–∏. –§—É–Ω–∫—Ü–∏—è –æ–±–æ–∑–Ω–∞—á–∞–µ—Ç—Å—è –∫–ª—é—á–µ–≤—ã–º —Å–ª–æ–≤–æ–º def, –∑–∞ –∫–æ—Ç–æ—Ä—ã–º —Å–ª–µ–¥—É–µ—Ç –∏–º—è —Ñ—É–Ω–∫—Ü–∏–∏ –∏ –Ω–∞–±–æ—Ä –∫—Ä—É–≥–ª—ã—Ö —Å–∫–æ–±–æ–∫.

–í —ç—Ç–æ–º –ø—Ä–∏–º–µ—Ä–µ –º—ã —Å–æ–±–∏—Ä–∞–µ–º—Å—è —Å–æ–∑–¥–∞—Ç—å –ø—Ä–æ—Å—Ç—É—é —Ñ—É–Ω–∫—Ü–∏—é, –∫–æ—Ç–æ—Ä–∞—è –≤—ã–≤–æ–¥–∏—Ç –æ–ø–µ—Ä–∞—Ç–æ—Ä It & rsquo. ; s Monday! –≤ –∫–æ–Ω—Å–æ–ª—å. –î–ª—è —ç—Ç–æ–≥–æ –º—ã –º–æ–∂–µ–º –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å —Å–ª–µ–¥—É—é—â–∏–π –∫–æ–¥:

–ö–æ–≥–¥–∞ –º—ã –∑–∞–ø—É—Å–∫–∞–µ–º –Ω–∞—à –∫–æ–¥, –Ω–∏—á–µ–≥–æ –Ω–µ –ø—Ä–æ–∏—Å—Ö–æ–¥–∏—Ç. –≠—Ç–æ –ø–æ—Ç–æ–º—É, —á—Ç–æ –¥–ª—è —Ç–æ–≥–æ, —á—Ç–æ–±—ã –Ω–∞—à–∞ —Ñ—É–Ω–∫—Ü–∏—è —Ä–∞–±–æ—Ç–∞–ª–∞, –Ω–∞–º –Ω—É–∂–Ω–æ –µ–µ –≤—ã–∑–≤–∞—Ç—å. –î–ª—è —ç—Ç–æ–≥–æ –º—ã –º–æ–∂–µ–º —É–∫–∞–∑–∞—Ç—å –∏–º—è –Ω–∞—à–µ–π —Ñ—É–Ω–∫—Ü–∏–∏ —Å–ª–µ–¥—É—é—â–∏–º –æ–±—Ä–∞–∑–æ–º:

–ù–∞—à –∫–æ–¥ –≤–æ–∑–≤—Ä–∞—â–∞–µ—Ç:

–î–∞–≤–∞–π—Ç–µ —Ä–∞–∑–±–µ—Ä–µ–º –æ—Å–Ω–æ–≤–Ω—ã–µ –∫–æ–º–ø–æ–Ω–µ–Ω—Ç—ã –Ω–∞—à–µ–π —Ñ—É–Ω–∫—Ü–∏–∏:

  • –∫–ª—é—á–µ–≤–æ–µ —Å–ª–æ–≤–æ def –∏—Å–ø–æ–ª—å–∑—É–µ—Ç—Å—è, —á—Ç–æ–±—ã —É–∫–∞–∑–∞—Ç—å, —á—Ç–æ –º—ã —Ö–æ—Ç–∏–º —Å–æ–∑–¥–∞—Ç—å —Ñ—É–Ω–∫—Ü–∏—é.
  • print_monday - —ç—Ç–æ –∏–º—è –Ω–∞—à–µ–π —Ñ—É–Ω–∫—Ü–∏–∏. –û–Ω –¥–æ–ª–∂–µ–Ω –±—ã—Ç—å —É–Ω–∏–∫–∞–ª—å–Ω—ã–º.
  • () - —ç—Ç–æ –º–µ—Å—Ç–æ, –≥–¥–µ –±—É–¥—É—Ç —Ö—Ä–∞–Ω–∏—Ç—å—Å—è –Ω–∞—à–∏ –ø–∞—Ä–∞–º–µ—Ç—Ä—ã. –ú—ã –ø–æ–≥–æ–≤–æ—Ä–∏–º –æ–± —ç—Ç–æ–º –ø–æ–∑–∂–µ.
  • : –æ—Ç–º–µ—á–∞–µ—Ç –∫–æ–Ω–µ—Ü –∑–∞–≥–æ–ª–æ–≤–∫–∞ –Ω–∞—à–µ–π —Ñ—É–Ω–∫—Ü–∏–∏.

–¢–µ–ø–µ—Ä—å –Ω–∞—à–∏ —Ñ—É–Ω–∫—Ü–∏–∏ –º–æ–≥—É—Ç –ø–æ–ª—É—á–∞—Ç—å –Ω–∞—Å—Ç–æ–ª—å–∫–æ —Å–ª–æ–∂–Ω—ã–º–∏, –Ω–∞—Å–∫–æ–ª—å–∫–æ –º—ã —Ö–æ—Ç–∏–º, —á—Ç–æ–±—ã –æ–Ω–∏ –±—ã–ª–∏. –ü—Ä–µ–¥–ø–æ–ª–æ–∂–∏–º, –º—ã —Ö–æ—Ç–∏–º –Ω–∞–ø–∏—Å–∞—Ç—å –ø—Ä–æ–≥—Ä–∞–º–º—É, –∫–æ—Ç–æ—Ä–∞—è —Å–æ–æ–±—â–∞–µ—Ç –ø–æ–ª—å–∑–æ–≤–∞—Ç–µ–ª—é, —Å–∫–æ–ª—å–∫–æ –±—É–∫–≤ –≤ –µ–≥–æ –∏–º–µ–Ω–∏. –ú—ã –º–æ–≥–ª–∏ –±—ã —Å–¥–µ–ª–∞—Ç—å —ç—Ç–æ, –∏—Å–ø–æ–ª—å–∑—É—è —Å–ª–µ–¥—É—é—â–∏–π –∫–æ–¥:

–ï—Å–ª–∏ –º—ã –∑–∞–ø—É—Å—Ç–∏–º –Ω–∞—à –∫–æ–¥ –∏ –≤–≤–µ–¥–∏—Ç–µ –∏–º—è " Elizabeth & rdquo ;, –±—É–¥–µ—Ç –≤–æ–∑–≤—Ä–∞—â–µ–Ω —Å–ª–µ–¥—É—é—â–∏–π –æ—Ç–≤–µ—Ç:

–ú—ã –æ–ø—Ä–µ–¥–µ–ª—è–µ–º —Ñ—É–Ω–∫—Ü–∏—é —Å –∏–º–µ–Ω–µ–º calculate_name_length (). –í —Ç–µ–ª–µ —Ñ—É–Ω–∫—Ü–∏–∏ –º—ã –∑–∞–ø—Ä–∞—à–∏–≤–∞–µ–º —É –ø–æ–ª—å–∑–æ–≤–∞—Ç–µ–ª—è –µ–≥–æ –∏–º—è, –∞ –∑–∞—Ç–µ–º –∏—Å–ø–æ–ª—å–∑—É–µ–º len () –¥–ª—è –≤—ã—á–∏—Å–ª–µ–Ω–∏—è –¥–ª–∏–Ω—ã –∏–º–µ–Ω–∏ –ø–æ–ª—å–∑–æ–≤–∞—Ç–µ–ª—è. –ù–∞–∫–æ–Ω–µ—Ü, –º—ã –≤—ã–≤–æ–¥–∏–º –Ω–∞ –∫–æ–Ω—Å–æ–ª—å " –î–ª–∏–Ω–∞ –≤–∞—à–µ–≥–æ –∏–º–µ–Ω–∏ —Å–æ—Å—Ç–∞–≤–ª—è–µ—Ç [–¥–ª–∏–Ω–∞] –±—É–∫–≤. & Rdquo ;, –≥–¥–µ –¥–ª–∏–Ω–∞ - —ç—Ç–æ –¥–ª–∏–Ω–∞ –∏–º–µ–Ω–∏ –ø–æ–ª—å–∑–æ–≤–∞—Ç–µ–ª—è.

–ü–∞—Ä–∞–º–µ—Ç—Ä—ã –∏ –∞—Ä–≥—É–º–µ–Ω—Ç—ã —Ñ—É–Ω–∫—Ü–∏–π

–í –Ω–∞—à–∏—Ö –ø–µ—Ä–≤—ã—Ö –ø—Ä–∏–º–µ—Ä–∞—Ö –º—ã –∏—Å–ø–æ–ª—å–∑–æ–≤–∞–ª–∏ –ø—É—Å—Ç—ã–µ –∫—Ä—É–≥–ª—ã–µ —Å–∫–æ–±–∫–∏ —Å –Ω–∞—à–∏–º–∏ —Ñ—É–Ω–∫—Ü–∏—è–º–∏. –≠—Ç–æ –æ–∑–Ω–∞—á–∞–µ—Ç, —á—Ç–æ –Ω–∞—à–∏ —Ñ—É–Ω–∫—Ü–∏–∏ –Ω–µ –ø—Ä–∏–Ω–∏–º–∞–ª–∏ –Ω–∏–∫–∞–∫–∏—Ö –∞—Ä–≥—É–º–µ–Ω—Ç–æ–≤.

–ê—Ä–≥—É–º–µ–Ω—Ç—ã –ø–æ–∑–≤–æ–ª—è—é—Ç –ø–µ—Ä–µ–¥–∞–≤–∞—Ç—å –≤ —Ñ—É–Ω–∫—Ü–∏—é –∏–Ω—Ñ–æ—Ä–º–∞—Ü–∏—é, –∫–æ—Ç–æ—Ä—É—é —Ñ—É–Ω–∫—Ü–∏—è –º–æ–∂–µ—Ç —á–∏—Ç–∞—Ç—å. –ê—Ä–≥—É–º–µ–Ω—Ç—ã —Ñ—É–Ω–∫—Ü–∏–∏ –∑–∞–∫–ª—é—á–µ–Ω—ã –≤ –∫—Ä—É–≥–ª—ã–µ —Å–∫–æ–±–∫–∏, —Å–ª–µ–¥—É—é—â–∏–µ –∑–∞ –∏–º–µ–Ω–µ–º —Ñ—É–Ω–∫—Ü–∏–∏.

–î–∞–≤–∞–π—Ç–µ –ø—Ä–æ–π–¥–µ–º—Å—è –ø–æ –±–∞–∑–æ–≤—ã–π –ø—Ä–∏–º–µ—Ä, –∏–ª–ª—é—Å—Ç—Ä–∏—Ä—É—é—â–∏–π, –∫–∞–∫ —Ä–∞–±–æ—Ç–∞—é—Ç –∞—Ä–≥—É–º–µ–Ω—Ç—ã.

–ü—Ä–∏–º–µ—Ä –ø–∞—Ä–∞–º–µ—Ç—Ä–æ–≤ –∏ –∞—Ä–≥—É–º–µ–Ω—Ç–æ–≤ Python

–ü—Ä–µ–¥–ø–æ–ª–æ–∂–∏–º, –º—ã —Ö–æ—Ç–∏–º —Å–æ–∑–¥–∞—Ç—å –ø—Ä–æ–≥—Ä–∞–º–º—É, –∫–æ—Ç–æ—Ä–∞—è —É–º–Ω–æ–∂–∞–µ—Ç –¥–≤–∞ —á–∏—Å–ª–∞. –ú—ã –º–æ–≥–ª–∏ –±—ã —Å–¥–µ–ª–∞—Ç—å —ç—Ç–æ, –∏—Å–ø–æ–ª—å–∑—É—è —Å–ª–µ–¥—É—é—â–∏–π –∫–æ–¥: < p> –ù–∞—à–∞ –ø—Ä–æ–≥—Ä–∞–º–º–∞ Python –≤–æ–∑–≤—Ä–∞—â–∞–µ—Ç:

–°–Ω–∞—á–∞–ª–∞ –º—ã –æ–ø—Ä–µ–¥–µ–ª—è–µ–º —Ñ—É–Ω–∫—Ü–∏—é —Å –∏–º–µ–Ω–µ–º multiply_numbers. –ò–º–µ–Ω–∞ –ø–∞—Ä–∞–º–µ—Ç—Ä–æ–≤ –≤ —Ñ—É–Ω–∫—Ü–∏–∏, –∫–æ—Ç–æ—Ä—ã–µ –ø—Ä–∏–Ω–∏–º–∞–µ—Ç –Ω–∞—à –∫–æ–¥: —á–∏—Å–ª–æ1 –∏ —á–∏—Å–ª–æ2. –ú—ã –æ–ø—Ä–µ–¥–µ–ª—è–µ–º –∏—Ö –≤ —Å–∫–æ–±–∫–∞—Ö, –≤ –∫–æ—Ç–æ—Ä—ã—Ö –æ–ø—Ä–µ–¥–µ–ª—è–µ—Ç—Å—è —Å–ø–∏—Å–æ–∫ –ø–∞—Ä–∞–º–µ—Ç—Ä–æ–≤.

–ó–∞—Ç–µ–º –º—ã –æ–±—ä—è–≤–ª—è–µ–º –ø–µ—Ä–µ–º–µ–Ω–Ω—É—é Python —Å –∏–º–µ–Ω–µ–º " answer " –∫–æ—Ç–æ—Ä—ã–π —É–º–Ω–æ–∂–∞–µ—Ç –∑–Ω–∞—á–µ–Ω–∏—è number1 –∏ number2. –ó–∞—Ç–µ–º –º—ã –≤—ã–≤–æ–¥–∏–º –Ω–∞ –∫–æ–Ω—Å–æ–ª—å –∏–Ω—Å—Ç—Ä—É–∫—Ü–∏—é —Å –≤—ã–ø–∏—Å–∞–Ω–Ω–æ–π –ø–æ–ª–Ω–æ–π –º–∞—Ç–µ–º–∞—Ç–∏—á–µ—Å–∫–æ–π —Å—É–º–º–æ–π, –∑–∞ –∫–æ—Ç–æ—Ä–æ–π —Å–ª–µ–¥—É–µ—Ç –æ—Ç–≤–µ—Ç –Ω–∞ –º–∞—Ç–µ–º–∞—Ç–∏—á–µ—Å–∫—É—é –∑–∞–¥–∞—á—É.

–ú—ã —É–∫–∞–∑–∞–ª–∏ –Ω–µ–æ–±—Ö–æ–¥–∏–º—ã–µ –∞—Ä–≥—É–º–µ–Ω—Ç—ã. –≠—Ç–æ –ø–æ—Ç–æ–º—É, —á—Ç–æ –º—ã –Ω–µ —É—Å—Ç–∞–Ω–æ–≤–∏–ª–∏ –∑–Ω–∞—á–µ–Ω–∏—è –ø–æ —É–º–æ–ª—á–∞–Ω–∏—é –¥–ª—è –∫–∞–∂–¥–æ–≥–æ –∞—Ä–≥—É–º–µ–Ω—Ç–∞. –ú—ã –¥–æ–ª–∂–Ω—ã —É–∫–∞–∑–∞—Ç—å –∫–æ–ª–∏—á–µ—Å—Ç–≤–æ –∞—Ä–≥—É–º–µ–Ω—Ç–æ–≤, —Ä–∞–≤–Ω–æ–µ –∫–æ–ª–∏—á–µ—Å—Ç–≤—É –∞—Ä–≥—É–º–µ–Ω—Ç–æ–≤ –≤ —Å–ø–∏—Å–∫–µ –ø–∞—Ä–∞–º–µ—Ç—Ä–æ–≤, –∏–Ω–∞—á–µ –∏–Ω—Ç–µ—Ä–ø—Ä–µ—Ç–∞—Ç–æ—Ä Python –≤–µ—Ä–Ω–µ—Ç –æ—à–∏–±–∫—É.

–í –∫–æ–Ω—Ü–µ –Ω–∞—à–µ–π –ø—Ä–æ–≥—Ä–∞–º–º—ã –º—ã –¥–≤–∞–∂–¥—ã –≤—ã–∑—ã–≤–∞–µ–º –Ω–∞—à—É —Ñ—É–Ω–∫—Ü–∏—é multiply_numbers .

–°–Ω–∞—á–∞–ª–∞ –º—ã —É–∫–∞–∑—ã–≤–∞–µ–º –∞—Ä–≥—É–º–µ–Ω—Ç—ã 5 –∏ 10. –ù–∞—à–∞ –ø—Ä–æ–≥—Ä–∞–º–º–∞ —É–º–Ω–æ–∂–∞–µ—Ç —ç—Ç–∏ –∑–Ω–∞—á–µ–Ω–∏—è –≤–º–µ—Å—Ç–µ, —á—Ç–æ–±—ã –≤—ã—á–∏—Å–ª–∏—Ç—å 50. –ó–∞—Ç–µ–º –Ω–∞—à–∞ –ø—Ä–æ–≥—Ä–∞–º–º–∞ –ø–µ—á–∞—Ç–∞–µ—Ç " 5 x 10 = 50 " –∫ –∫–æ–Ω—Å–æ–ª–∏. –î–∞–ª–µ–µ –º—ã —É–∫–∞–∑—ã–≤–∞–µ–º –∞—Ä–≥—É–º–µ–Ω—Ç—ã 15 –∏ 2, –∫–æ—Ç–æ—Ä—ã–µ –Ω–∞—à–∞ –ø—Ä–æ–≥—Ä–∞–º–º–∞ —É–º–Ω–æ–∂–∞–µ—Ç. –ó–∞—Ç–µ–º –Ω–∞—à–∞ –ø—Ä–æ–≥—Ä–∞–º–º–∞ –Ω–∞–ø–µ—á–∞—Ç–∞–µ—Ç " 15 x 2 = 30 " –Ω–∞ –∫–æ–Ω—Å–æ–ª—å.

"–ö–∞—Ä—å–µ—Ä–∞ –ö–∞—Ä–º–∞ –≤–æ—à–ª–∞ –≤ –º–æ—é –∂–∏–∑–Ω—å, –∫–æ–≥–¥–∞ —è –±–æ–ª—å—à–µ –≤—Å–µ–≥–æ –≤ –Ω–µ–π –Ω—É–∂–¥–∞–ª–∞—Å—å, –∏ –±—ã—Å—Ç—Ä–æ –ø–æ–º–æ–≥–ª–∞ –º–Ω–µ –ø—Ä–æ–π—Ç–∏ –∫—É—Ä—Å –æ–±—É—á–µ–Ω–∏—è. –ß–µ—Ä–µ–∑ –¥–≤–∞ –º–µ—Å—è—Ü–∞ –ø–æ—Å–ª–µ –æ–∫–æ–Ω—á–∞–Ω–∏—è —É—á–µ–±—ã —è –Ω–∞—à–µ–ª —Ä–∞–±–æ—Ç—É —Å–≤–æ–µ–π –º–µ—á—Ç—ã, –∫–æ—Ç–æ—Ä–∞—è —Å–æ–æ—Ç–≤–µ—Ç—Å—Ç–≤–æ–≤–∞–ª–∞ –º–æ–∏–º —Ü–µ–Ω–Ω–æ—Å—Ç—è–º –∏ —Ü–µ–ª—è–º –≤ –∂–∏–∑–Ω–∏. ! "

–í–µ–Ω–µ—Ä–∞, –∏–Ω–∂–µ–Ω–µ—Ä-–ø—Ä–æ–≥—Ä–∞–º–º–∏—Å—Ç Rockbot

–ü–æ —É–º–æ–ª—á–∞–Ω–∏—é –ø–æ—Ä—è–¥–æ–∫ –∞—Ä–≥—É–º–µ–Ω—Ç–æ–≤, –∫–æ—Ç–æ—Ä—ã–µ –≤—ã –ø–µ—Ä–µ–¥–∞–µ—Ç–µ –≤ —Ñ—É–Ω–∫—Ü–∏—é, —Å–æ–æ—Ç–≤–µ—Ç—Å—Ç–≤—É–µ—Ç –ø–æ—Ä—è–¥–∫—É –∫–æ—Ç–æ—Ä—ã–µ –æ–Ω–∏ –æ–±—Ä–∞–±–∞—Ç—ã–≤–∞—é—Ç—Å—è –≤–∞—à–µ–π –ø—Ä–æ–≥—Ä–∞–º–º–æ–π. –ö–æ–≥–¥–∞ –º—ã –∑–∞–ø—É—Å–∫–∞–µ–º " multiply_numbers (5, 10) & rdquo ;, –∑–Ω–∞—á–µ–Ω–∏–µ " number1 " —Å—Ç–∞–Ω–æ–≤–∏—Ç—Å—è 5. –ó–Ω–∞—á–µ–Ω–∏–µ " number2 " —Å—Ç–∞–Ω–æ–≤–∏—Ç—Å—è 10. –ú—ã –ø–æ–≥–æ–≤–æ—Ä–∏–º –æ —Ç–æ–º, –∫–∞–∫ –ø–µ—Ä–µ–æ–ø—Ä–µ–¥–µ–ª–∏—Ç—å —ç—Ç–æ –≤ –∫–ª—é—á–µ–≤–æ–º —Å–ª–æ–≤–µ arguments " —Ä–∞–∑–¥–µ–ª.

–î–ª—è –ø–æ–ª—É—á–µ–Ω–∏—è –¥–æ–ø–æ–ª–Ω–∏—Ç–µ–ª—å–Ω–æ–π –∏–Ω—Ñ–æ—Ä–º–∞—Ü–∏–∏ –æ–± –∞—Ä–≥—É–º–µ–Ω—Ç–∞—Ö –æ–∑–Ω–∞–∫–æ–º—å—Ç–µ—Å—å —Å –Ω–∞—à–∏–º —Ä—É–∫–æ–≤–æ–¥—Å—Ç–≤–æ–º –ø–æ –Ω–µ–æ–±—è–∑–∞—Ç–µ–ª—å–Ω—ã–º –∞—Ä–≥—É–º–µ–Ω—Ç–∞–º Python .

–ü—Ä–∏–º–µ—á–∞–Ω–∏–µ : –ü–∞—Ä–∞–º–µ—Ç—Ä—ã –∏ –∞—Ä–≥—É–º–µ–Ω—Ç—ã

–¢–µ—Ä–º–∏–Ω—ã –ø–∞—Ä–∞–º–µ—Ç—Ä –∏ –∞—Ä–≥—É–º–µ–Ω—Ç –æ—Ç–Ω–æ—Å—è—Ç—Å—è –∫ –æ–¥–Ω–æ–º—É –∏ —Ç–æ–º—É –∂–µ: –ø–µ—Ä–µ–¥–∞—á–µ –∏–Ω—Ñ–æ—Ä–º–∞—Ü–∏–∏ —Ñ—É–Ω–∫—Ü–∏–∏. –ù–æ –º–µ–∂–¥—É –Ω–∏–º–∏ –µ—Å—Ç—å –Ω–µ–±–æ–ª—å—à–∞—è —Ä–∞–∑–Ω–∏—Ü–∞.

< / a>

–ü–∞—Ä–∞–º–µ—Ç—Ä - —ç—Ç–æ –ø–µ—Ä–µ–º–µ–Ω–Ω–∞—è –≤ —Å–∫–æ–±–∫–∞—Ö –≤ —Ñ—É–Ω–∫—Ü–∏–∏. –ê—Ä–≥—É–º–µ–Ω—Ç - —ç—Ç–æ –∑–Ω–∞—á–µ–Ω–∏–µ, –∫–æ—Ç–æ—Ä–æ–µ –ø–µ—Ä–µ–¥–∞–µ—Ç—Å—è —Ñ—É–Ω–∫—Ü–∏–∏ –ø—Ä–∏ –µ–µ –≤—ã–∑–æ–≤–µ. –ò—Ç–∞–∫, –≤ –Ω–∞—à–µ–º –ø–æ—Å–ª–µ–¥–Ω–µ–º –ø—Ä–∏–º–µ—Ä–µ " number1 " –∏ " number2 " - –ø–∞—Ä–∞–º–µ—Ç—Ä—ã, –∞ 5 –∏ 10 - –∞—Ä–≥—É–º–µ–Ω—Ç—ã.

–ê—Ä–≥—É–º–µ–Ω—Ç—ã –∫–ª—é—á–µ–≤–æ–≥–æ —Å–ª–æ–≤–∞ —Ñ—É–Ω–∫—Ü–∏–∏

–ö–∞–∫ –º—ã —É–∂–µ –æ–±—Å—É–∂–¥–∞–ª–∏, –ø–æ—Ä—è–¥–æ–∫, –≤ –∫–æ—Ç–æ—Ä–æ–º –≤—ã –ø–µ—Ä–µ–¥–∞–µ—Ç–µ –∞—Ä–≥—É–º–µ–Ω—Ç—ã, - —ç—Ç–æ –ø–æ—Ä—è–¥–æ–∫, –≤ –∫–æ—Ç–æ—Ä–æ–º –≤–∞—à–∞ –ø—Ä–æ–≥—Ä–∞–º–º–∞ –±—É–¥–µ—Ç –æ–±—Ä–∞–±–∞—Ç—ã–≤–∞—Ç—å –∏—Ö. –¢–∞–∫–∏–º –æ–±—Ä–∞–∑–æ–º, –ø–µ—Ä–≤—ã–π –ø–∞—Ä–∞–º–µ—Ç—Ä –±—É–¥–µ—Ç –Ω–∞–∑–Ω–∞—á–µ–Ω –ø–µ—Ä–≤–æ–º—É –∞—Ä–≥—É–º–µ–Ω—Ç—É –∏ —Ç. –¥. –û–¥–Ω–∞–∫–æ –µ—Å—Ç—å —Å–ø–æ—Å–æ–± –ø–µ—Ä–µ–æ–ø—Ä–µ–¥–µ–ª–∏—Ç—å —ç—Ç–æ –ø—Ä–∞–≤–∏–ª–æ.

–í—ã –º–æ–∂–µ—Ç–µ –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å –∞—Ä–≥—É–º–µ–Ω—Ç—ã –∫–ª—é—á–µ–≤–æ–≥–æ —Å–ª–æ–≤–∞ –≤ –≤—ã–∑–æ–≤–µ —Ñ—É–Ω–∫—Ü–∏–∏, —á—Ç–æ –ø–æ–∑–≤–æ–ª—è–µ—Ç –≤—ã –º–æ–∂–µ—Ç–µ –Ω–∞–∑–Ω–∞—á–∏—Ç—å –∑–Ω–∞—á–µ–Ω–∏–µ –∞—Ä–≥—É–º–µ–Ω—Ç–∞ –Ω–∞ –æ—Å–Ω–æ–≤–µ –µ–≥–æ –∏–º–µ–Ω–∏ –ø–∞—Ä–∞–º–µ—Ç—Ä–∞. –ò—Å–ø–æ–ª—å–∑–æ–≤–∞–Ω–∏–µ –∞—Ä–≥—É–º–µ–Ω—Ç–æ–≤ –∫–ª—é—á–µ–≤–æ–≥–æ —Å–ª–æ–≤–∞ –ø–æ–∑–≤–æ–ª—è–µ—Ç –≤–∞–º —É–∫–∞–∑—ã–≤–∞—Ç—å –∑–Ω–∞—á–µ–Ω–∏–µ –∫–ª—é—á–µ–≤—ã—Ö —Å–ª–æ–≤ –≤ –ª—é–±–æ–º –ø–æ—Ä—è–¥–∫–µ.

–ê—Ä–≥—É–º–µ–Ω—Ç—ã –∫–ª—é—á–µ–≤–æ–≥–æ —Å–ª–æ–≤–∞ —Ä–∞–±–æ—Ç–∞—é—Ç, –ø–æ—Ç–æ–º—É —á—Ç–æ –≤—ã –±—É–¥–µ—Ç–µ –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å –∫–ª—é—á–µ–≤—ã–µ —Å–ª–æ–≤–∞ –¥–ª—è —Å–æ–ø–æ—Å—Ç–∞–≤–ª—è—Ç—å –∑–Ω–∞—á–µ–Ω–∏—è —Å –ø–∞—Ä–∞–º–µ—Ç—Ä–∞–º–∏ –≤–º–µ—Å—Ç–æ —Ç–æ–≥–æ, —á—Ç–æ–±—ã –ø–æ–ª–∞–≥–∞—Ç—å—Å—è –Ω–∞ –ø–æ—Ä—è–¥–æ–∫ –∞—Ä–≥—É–º–µ–Ω—Ç–æ–≤ –¥–ª—è –ø–µ—Ä–µ–¥–∞—á–∏ –∑–Ω–∞—á–µ–Ω–∏–π.

–ü—Ä–µ–¥–ø–æ–ª–æ–∂–∏–º, –º—ã —Å–æ–∑–¥–∞–µ–º –ø—Ä–æ–≥—Ä–∞–º–º—É, –∫–æ—Ç–æ—Ä–∞—è –ø–µ—á–∞—Ç–∞–µ—Ç –∏–º—è –∏ –∞–¥—Ä–µ—Å —ç–ª–µ–∫—Ç—Ä–æ–Ω–Ω–æ–π –ø–æ—á—Ç—ã –∫–æ–≥–æ-—Ç–æ, –∫—Ç–æ –ø–æ–¥–ø–∏—Å–∞–ª—Å—è –Ω–∞ —Å–ø–∏—Å–æ–∫ —Ä–∞—Å—Å—ã–ª–∫–∏. –ú—ã –º–æ–≥–ª–∏ –±—ã –Ω–∞–ø–∏—Å–∞—Ç—å —ç—Ç—É –ø—Ä–æ–≥—Ä–∞–º–º—É, –∏—Å–ø–æ–ª—å–∑—É—è —Å–ª–µ–¥—É—é—â–∏–π –∫–æ–¥:

–ù–∞—à –∫–æ–¥ –≤–æ–∑–≤—Ä–∞—â–∞–µ—Ç:

< p> –ú—ã –æ–±—ä—è–≤–ª—è–µ–º —Ñ—É–Ω–∫—Ü–∏—é, –∫–æ—Ç–æ—Ä–∞—è –ø—Ä–∏–Ω–∏–º–∞–µ—Ç –¥–≤–∞ –ø–∞—Ä–∞–º–µ—Ç—Ä–∞: –∏–º—è –∏ –∞–¥—Ä–µ—Å —ç–ª–µ–∫—Ç—Ä–æ–Ω–Ω–æ–π –ø–æ—á—Ç—ã. –ú—ã –≤—ã–≤–æ–¥–∏–º –Ω–∞ –∫–æ–Ω—Å–æ–ª—å " Name: ", –∑–∞ –∫–æ—Ç–æ—Ä—ã–º —Å–ª–µ–¥—É–µ—Ç –∑–Ω–∞—á–µ–Ω–∏–µ –ø–∞—Ä–∞–º–µ—Ç—Ä–∞ name. –ó–∞—Ç–µ–º –º—ã –≤—ã–≤–æ–¥–∏–º –Ω–∞ –∫–æ–Ω—Å–æ–ª—å " _Email: " _, –∑–∞ –∫–æ—Ç–æ—Ä—ã–º —Å–ª–µ–¥—É–µ—Ç –∑–Ω–∞—á–µ–Ω–∏–µ –ø–∞—Ä–∞–º–µ—Ç—Ä–∞ email. –ú—ã –∏—Å–ø–æ–ª—å–∑—É–µ–º –æ–ø–µ—Ä–∞—Ç–æ—Ä—ã Python print () –¥–ª—è –≤—ã–≤–æ–¥–∞ —ç—Ç–∏—Ö –∑–Ω–∞—á–µ–Ω–∏–π –Ω–∞ –∫–æ–Ω—Å–æ–ª—å.

–ó–∞—Ç–µ–º –º—ã –≤—ã–∑—ã–≤–∞–µ–º –Ω–∞—à—É —Ñ—É–Ω–∫—Ü–∏—é –∏ —É–∫–∞–∂–∏—Ç–µ –¥–≤–∞ –∞—Ä–≥—É–º–µ–Ω—Ç–∞. –ê—Ä–≥—É–º–µ–Ω—Ç email –ø—Ä–∏—Ä–∞–≤–Ω–∏–≤–∞–µ—Ç—Å—è –∫ [email protected] , –∞ –∞—Ä–≥—É–º–µ–Ω—Ç name —Å—Ç–∞–Ω–æ–≤–∏—Ç—Å—è —Ä–∞–≤–Ω—ã–º Alex Hammond.

–í –Ω–∞—à–µ–º –∫–æ–¥–µ –º—ã —Ä–∞–∑–¥–µ–ª–∏–ª–∏ –∏–º—è –¥–ª—è –∞—Ä–≥—É–º–µ–Ω—Ç–∞ –∏ –µ–≥–æ –∑–Ω–∞—á–µ–Ω–∏—è –∏—Å–ø–æ–ª—å–∑—É–µ—Ç—Å—è –∑–Ω–∞–∫ —Ä–∞–≤–µ–Ω—Å—Ç–≤–∞ (=). –≠—Ç–æ –æ–∑–Ω–∞—á–∞–ª–æ, —á—Ç–æ –Ω–∞–º –±–æ–ª—å—à–µ –Ω–µ –Ω—É–∂–Ω–æ –±—ã–ª–æ —É–∫–∞–∑—ã–≤–∞—Ç—å –Ω–∞—à–∏ –∞—Ä–≥—É–º–µ–Ω—Ç—ã –≤ –ø–æ—Ä—è–¥–∫–µ –ø–æ—è–≤–ª–µ–Ω–∏—è –Ω–∞—à–∏—Ö –ø–∞—Ä–∞–º–µ—Ç—Ä–æ–≤ (–∏–º—è, –∞–¥—Ä–µ—Å —ç–ª–µ–∫—Ç—Ä–æ–Ω–Ω–æ–π –ø–æ—á—Ç—ã). –ú—ã –º–æ–≥–ª–∏ –±—ã –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å –ª—é–±–æ–π –ø–æ—Ä—è–¥–æ–∫, –∫–∞–∫–æ–π –∑–∞—Ö–æ—Ç–∏–º.

–ó–Ω–∞—á–µ–Ω–∏—è –∞—Ä–≥—É–º–µ–Ω—Ç–æ–≤ –ø–æ —É–º–æ–ª—á–∞–Ω–∏—é

–ö—Ä–æ–º–µ —Ç–æ–≥–æ, –≤—ã –º–æ–∂–µ—Ç–µ —É–∫–∞–∑–∞—Ç—å –∑–Ω–∞—á–µ–Ω–∏–µ –∞—Ä–≥—É–º–µ–Ω—Ç–∞ –ø–æ —É–º–æ–ª—á–∞–Ω–∏—é –¥–ª—è –ø–∞—Ä–∞–º–µ—Ç—Ä–∞ –≤ —Ñ—É–Ω–∫—Ü–∏–∏.

–ü—Ä–µ–¥–ø–æ–ª–æ–∂–∏–º, –º—ã —Ö–æ—Ç–∏–º, —á—Ç–æ–±—ã –∑–Ω–∞—á–µ–Ω–∏–µ email –±—ã–ª–æ [email protected] –ø–æ —É–º–æ–ª—á–∞–Ω–∏—é. –≠—Ç–æ –º–æ–∂–Ω–æ —Å–¥–µ–ª–∞—Ç—å —Å –ø–æ–º–æ—â—å—é —Å–ª–µ–¥—É—é—â–µ–≥–æ –∫–æ–¥–∞:

–ù–∞—à –∫–æ–¥ Python –≤–æ–∑–≤—Ä–∞—â–∞–µ—Ç:

–ú—ã —É—Å—Ç–∞–Ω–∞–≤–ª–∏–≤–∞–µ–º –∑–Ω–∞—á–µ–Ω–∏–µ –ø–æ —É–º–æ–ª—á–∞–Ω–∏—é –ø–∞—Ä–∞–º–µ—Ç—Ä–∞ email –¥–æ–ª–∂–Ω–æ –±—ã—Ç—å [email protected] < / –∞>. –ö–æ–≥–¥–∞ –º—ã –∑–∞–ø—É—Å–∫–∞–µ–º –Ω–∞—à –∫–æ–¥ –∏ –≤—ã–∑—ã–≤–∞–µ–º —Ñ—É–Ω–∫—Ü–∏—é print_info (), –Ω–∞–º –Ω–µ –Ω—É–∂–Ω–æ —É–∫–∞–∑—ã–≤–∞—Ç—å –∑–Ω–∞—á–µ–Ω–∏–µ –¥–ª—è –∞—Ä–≥—É–º–µ–Ω—Ç–∞ email. –í —ç—Ç–æ–º –ø—Ä–∏–º–µ—Ä–µ, –∫–æ–≥–¥–∞ –º—ã –≤—ã–ø–æ–ª–Ω—è–µ–º print_info (), –º—ã —É–∫–∞–∑—ã–≤–∞–µ–º —Ç–æ–ª—å–∫–æ –æ–¥–∏–Ω –∞—Ä–≥—É–º–µ–Ω—Ç: –∏–º—è –ø–æ–ª—å–∑–æ–≤–∞—Ç–µ–ª—è.

–í–æ–∑–≤—Ä–∞—â–µ–Ω–∏–µ –∑–Ω–∞—á–µ–Ω–∏–π –≤ –æ—Å–Ω–æ–≤–Ω—É—é –ø—Ä–æ–≥—Ä–∞–º–º—É

–î–æ —Å–∏—Ö –ø–æ—Ä –º—ã –æ–±—Å—É–∂–¥–∞–ª–∏, –∫–∞–∫ –ø–µ—Ä–µ–¥–∞–≤–∞—Ç—å –∑–Ω–∞—á–µ–Ω–∏—è –≤ —Ñ—É–Ω–∫—Ü–∏—é. –ù–æ —Ñ—É–Ω–∫—Ü–∏—é —Ç–∞–∫–∂–µ –º–æ–∂–Ω–æ –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å –¥–ª—è –ø–µ—Ä–µ–¥–∞—á–∏ –∑–Ω–∞—á–µ–Ω–∏–π –æ—Å—Ç–∞–ª—å–Ω–æ–π —á–∞—Å—Ç–∏ –ø—Ä–æ–≥—Ä–∞–º–º—ã.

< / a>

–û–ø–µ—Ä–∞—Ç–æ—Ä return –∑–∞–≤–µ—Ä—à–∞–µ—Ç —Ñ—É–Ω–∫—Ü–∏—é –∏ –ø–æ–∑–≤–æ–ª—è–µ—Ç –ø–µ—Ä–µ–¥–∞—Ç—å –∑–Ω–∞—á–µ–Ω–∏–µ –æ–±—Ä–∞—Ç–Ω–æ –≤ –æ—Å–Ω–æ–≤–Ω—É—é –ø—Ä–æ–≥—Ä–∞–º–º—É. –ï—Å–ª–∏ –≤—ã –∏—Å–ø–æ–ª—å–∑—É–µ—Ç–µ –æ–ø–µ—Ä–∞—Ç–æ—Ä return –±–µ–∑ –∞—Ä–≥—É–º–µ–Ω—Ç, —Ñ—É–Ω–∫—Ü–∏—è –≤–µ—Ä–Ω–µ—Ç –∑–Ω–∞—á–µ–Ω–∏–µ None.

–ü—Ä–µ–¥–ø–æ–ª–æ–∂–∏–º, –º—ã —Ö–æ—Ç–∏–º —Å–æ–∑–¥–∞—Ç—å –ø—Ä–æ–≥—Ä–∞–º–º—É, –∫–æ—Ç–æ—Ä–∞—è —É–º–Ω–æ–∂–∞–µ—Ç –¥–≤–∞ —á–∏—Å–ª–∞. –ó–∞—Ç–µ–º, –∫–æ–≥–¥–∞ —ç—Ç–∏ –¥–≤–∞ —á–∏—Å–ª–∞ –±—ã–ª–∏ —É–º–Ω–æ–∂–µ–Ω—ã, –º—ã —Ö–æ—Ç–∏–º –≤–µ—Ä–Ω—É—Ç—å –∏—Ö –≤ –Ω–∞—à—É –æ—Å–Ω–æ–≤–Ω—É—é –ø—Ä–æ–≥—Ä–∞–º–º—É. –≠—Ç–æ –º–æ–∂–Ω–æ —Å–¥–µ–ª–∞—Ç—å —Å –ø–æ–º–æ—â—å—é —Å–ª–µ–¥—É—é—â–µ–≥–æ –∫–æ–¥–∞:

–ù–∞—à –∫–æ–¥ –≤–æ–∑–≤—Ä–∞—â–∞–µ—Ç:

–°–Ω–∞—á–∞–ª–∞ –º—ã –æ–ø—Ä–µ–¥–µ–ª—è–µ–º —Ñ—É–Ω–∫—Ü–∏—é —Å –∏–º–µ–Ω–µ–º multiply_numbers. –≠—Ç–∞ —Ñ—É–Ω–∫—Ü–∏—è –ø—Ä–∏–Ω–∏–º–∞–µ—Ç –¥–≤–∞ –ø–∞—Ä–∞–º–µ—Ç—Ä–∞: —á–∏—Å–ª–æ1 –∏ —á–∏—Å–ª–æ2 . –ö–æ–≥–¥–∞ —ç—Ç–∞ —Ñ—É–Ω–∫—Ü–∏—è –≤—ã–∑—ã–≤–∞–µ—Ç—Å—è, –∑–Ω–∞—á–µ–Ω–∏—è " number1 " –∏ " number2 " —É–º–Ω–æ–∂–∞—é—Ç—Å—è. –ó–∞—Ç–µ–º –º—ã –∏—Å–ø–æ–ª—å–∑—É–µ–º –æ–ø–µ—Ä–∞—Ç–æ—Ä return –¥–ª—è –ø–µ—Ä–µ–¥–∞—á–∏ —É–º–Ω–æ–∂–µ–Ω–Ω–æ–≥–æ —á–∏—Å–ª–∞ –≤ –æ—Å–Ω–æ–≤–Ω—É—é –ø—Ä–æ–≥—Ä–∞–º–º—É.

–ú—ã –≤—ã–∑—ã–≤–∞–µ–º —Ñ—É–Ω–∫—Ü–∏—é multiply_numbers () –∏ —É–∫–∞–∑—ã–≤–∞–µ–º –¥–≤–∞ –∞—Ä–≥—É–º–µ–Ω—Ç–∞: 5 –∏ 6. –û–±—Ä–∞—Ç–∏—Ç–µ –≤–Ω–∏–º–∞–Ω–∏–µ, —á—Ç–æ –º—ã —Ç–∞–∫–∂–µ –ø—Ä–∏—Å–≤–∞–∏–≤–∞–µ–º —Ä–µ–∑—É–ª—å—Ç–∞—Ç —Ñ—É–Ω–∫—Ü–∏–∏ –ø–µ—Ä–µ–º–µ–Ω–Ω–æ–π " ans & rdquo ;. –ö–æ–≥–¥–∞ —ç—Ç–∞ —Å—Ç—Ä–æ–∫–∞ –∫–æ–¥–∞ –∑–∞–ø—É—Å–∫–∞–µ—Ç—Å—è, –≤—ã–∑—ã–≤–∞–µ—Ç—Å—è –Ω–∞—à–∞ —Ñ—É–Ω–∫—Ü–∏—è, –∏ –µ–µ —Ä–µ–∑—É–ª—å—Ç–∞—Ç –ø—Ä–∏—Å–≤–∞–∏–≤–∞–µ—Ç—Å—è " ans & rdquo ;. –ó–∞—Ç–µ–º –Ω–∞—à –∫–æ–¥ –≤—ã–≤–æ–¥–∏—Ç –∑–Ω–∞—á–µ–Ω–∏–µ " ans & rdquo ;, –∫–æ—Ç–æ—Ä–æ–µ –≤ –¥–∞–Ω–Ω–æ–º —Å–ª—É—á–∞–µ —Ä–∞–≤–Ω–æ 30.

Python < –æ–ø–µ—Ä–∞—Ç–æ—Ä href = "/ python-return /"> return –æ—Å—Ç–∞–Ω–∞–≤–ª–∏–≤–∞–µ—Ç –≤—ã–ø–æ–ª–Ω–µ–Ω–∏–µ —Ñ—É–Ω–∫—Ü–∏–∏, –¥–∞–∂–µ –µ—Å–ª–∏ –æ–Ω –Ω–µ –≤–æ–∑–≤—Ä–∞—â–∞–µ—Ç —Ü–µ–Ω–∏—Ç—å. –í–æ—Ç –ø—Ä–∏–º–µ—Ä —Ç–∞–∫–æ–≥–æ –ø–æ–≤–µ–¥–µ–Ω–∏—è –≤ –¥–µ–π—Å—Ç–≤–∏–∏:

–ù–∞—à –∫–æ–¥ –Ω–∏—á–µ–≥–æ –Ω–µ –≤—ã–≤–æ–¥–∏—Ç –Ω–∞ –∫–æ–Ω—Å–æ–ª—å. –•–æ—Ç—è –µ—Å—Ç—å " print (" Finished ") " –≤ –Ω–∞—à–µ–º –∫–æ–¥–µ –æ–Ω –Ω–µ –≤—ã–ø–æ–ª–Ω—è–µ—Ç—Å—è.

–≠—Ç–æ –ø–æ—Ç–æ–º—É, —á—Ç–æ, –∫–æ–≥–¥–∞ –Ω–∞—à —Ü–∏–∫–ª for –≤—ã–ø–æ–ª–Ω—è–µ—Ç—Å—è —á–µ—Ç—ã—Ä–µ —Ä–∞–∑–∞ (–∫–æ–≥–¥–∞ i —Ä–∞–≤–Ω–æ 4), –≤—ã–ø–æ–ª–Ω—è–µ—Ç—Å—è –∏–Ω—Å—Ç—Ä—É–∫—Ü–∏—è return. –≠—Ç–æ –ø—Ä–∏–≤–æ–¥–∏—Ç –∫ —Ç–æ–º—É, —á—Ç–æ –Ω–∞—à–∞ —Ñ—É–Ω–∫—Ü–∏—è –æ—Å—Ç–∞–Ω–∞–≤–ª–∏–≤–∞–µ—Ç –≤—ã–ø–æ–ª–Ω–µ–Ω–∏–µ –∏ –æ—Å—Ç–∞–Ω–∞–≤–ª–∏–≤–∞–µ—Ç –≤—ã–ø–æ–ª–Ω–µ–Ω–∏–µ –Ω–∞—à–µ–≥–æ —Ü–∏–∫–ª–∞.

–ü–æ—Å–ª–µ —Ç–æ–≥–æ, –∫–∞–∫ –Ω–∞—à–∞ —Ñ—É–Ω–∫—Ü–∏—è –ø–µ—Ä–µ—Å—Ç–∞–µ—Ç —Ä–∞–±–æ—Ç–∞—Ç—å, –∫–æ–¥ –≤ –Ω–∞—à–µ–π –æ—Å–Ω–æ–≤–Ω–æ–π –ø—Ä–æ–≥—Ä–∞–º–º–µ –ø—Ä–æ–¥–æ–ª–∂–∏—Ç –≤—ã–ø–æ–ª–Ω–µ–Ω–∏–µ.

–ó–∞–∫–ª—é—á–µ–Ω–∏–µ

–§—É–Ω–∫—Ü–∏–∏ Python - —ç—Ç–æ –±–ª–æ–∫–∏ –∫–æ–¥–∞, –∫–æ—Ç–æ—Ä—ã–µ –≤—ã–ø–æ–ª–Ω—è—é—Ç –æ–ø—Ä–µ–¥–µ–ª–µ–Ω–Ω–æ–µ –¥–µ–π—Å—Ç–≤–∏–µ. –§—É–Ω–∫—Ü–∏–∏ –≤ –ø—Ä–æ–≥—Ä–∞–º–º–µ –º–æ–∂–Ω–æ –≤—ã–∑—ã–≤–∞—Ç—å —Å–∫–æ–ª—å–∫–æ —É–≥–æ–¥–Ω–æ —Ä–∞–∑. –≠—Ç–æ –æ–∑–Ω–∞—á–∞–µ—Ç, —á—Ç–æ –≤—ã –º–æ–∂–µ—Ç–µ –∑–∞–ø—É—Å–∫–∞—Ç—å –æ–¥–∏–Ω –∏ —Ç–æ—Ç –∂–µ –±–ª–æ–∫ –∫–æ–¥–∞ –Ω–µ—Å–∫–æ–ª—å–∫–æ —Ä–∞–∑, –Ω–µ –ø–æ–≤—Ç–æ—Ä—è—è —Å–≤–æ–π –∫–æ–¥.

–§—É–Ω–∫—Ü–∏–∏ –ø–æ–∑–≤–æ–ª—è—é—Ç —É–º–µ–Ω—å—à–∏—Ç—å –∫–æ–ª–∏—á–µ—Å—Ç–≤–æ –ø–æ–≤—Ç–æ—Ä–µ–Ω–∏–π –≤ –≤–∞—à–µ–º –∫–æ–¥–µ, —Ç–µ–º —Å–∞–º—ã–º –æ–±–ª–µ–≥—á–∞—è —á—Ç–µ–Ω–∏–µ –≤–∞—à–∏—Ö –ø—Ä–æ–≥—Ä–∞–º–º –∫–∞–∫ –≤–∞–º, —Ç–∞–∫ –∏ –¥—Ä—É–≥–∏–º –∫–æ–¥–∏—Ä–æ–≤—â–∏–∫–∞–º. .

–î–ª—è –∑–∞–¥–∞—á–∏ –Ω–∞–ø–∏—à–∏—Ç–µ —Ñ—É–Ω–∫—Ü–∏—é, –∫–æ—Ç–æ—Ä–∞—è –≤—ã–≤–æ–¥–∏—Ç –Ω–∞ –∫–æ–Ω—Å–æ–ª—å –∫–∞–∂–¥–æ–µ —á–∏—Å–ª–æ –æ—Ç 1 –¥–æ 10 (–≤–∫–ª—é—á–∞—è 10). –≠—Ç–∞ —Ñ—É–Ω–∫—Ü–∏—è –¥–æ–ª–∂–Ω–∞ —Å–æ–¥–µ—Ä–∂–∞—Ç—å —Ü–∏–∫–ª for. –ö–æ–≥–¥–∞ —Ñ—É–Ω–∫—Ü–∏—è –±—É–¥–µ—Ç –≤—ã–ø–æ–ª–Ω–µ–Ω–∞, –≤—ã –¥–æ–ª–∂–Ω—ã –Ω–∞–ø–µ—á–∞—Ç–∞—Ç—å " –ì–æ—Ç–æ–≤–æ! & Rdquo; –∫ –∫–æ–Ω—Å–æ–ª–∏. –í—ã–∑–æ–≤–∏—Ç–µ –≤–∞—à—É —Ñ—É–Ω–∫—Ü–∏—é –æ–¥–∏–Ω —Ä–∞–∑ –≤ –∫–æ–Ω—Ü–µ –≤–∞—à–µ–π –ø—Ä–æ–≥—Ä–∞–º–º—ã.

–†–µ–∑—É–ª—å—Ç–∞—Ç –¥–æ–ª–∂–µ–Ω –±—ã—Ç—å:

–í —ç—Ç–æ–º —Ä—É–∫–æ–≤–æ–¥—Å—Ç–≤–µ –æ–±—Å—É–∂–¥–∞–ª–∏—Å—å –æ—Å–Ω–æ–≤—ã —Ñ—É–Ω–∫—Ü–∏–π –≤ Python, –∫–∞–∫ –ø–∏—Å–∞—Ç—å –∏ –≤—ã–∑—ã–≤–∞—Ç—å —Ñ—É–Ω–∫—Ü–∏—é, –∞ —Ç–∞–∫–∂–µ –∫–∞–∫ —Ä–∞–±–æ—Ç–∞—Ç—å —Å –∞—Ä–≥—É–º–µ–Ω—Ç–∞–º–∏ –∏ –ø–∞—Ä–∞–º–µ—Ç—Ä–∞–º–∏. –¢–µ–ø–µ—Ä—å –≤—ã –≥–æ—Ç–æ–≤—ã –Ω–∞—á–∞—Ç—å –ø–∏—Å–∞—Ç—å —Ñ—É–Ω–∫—Ü–∏–∏ –Ω–∞ Python, –∫–∞–∫ —ç–∫—Å–ø–µ—Ä—Ç!

–ß—Ç–æ–±—ã –ø–æ–ª—É—á–∏—Ç—å —Å–æ–≤–µ—Ç—ã –ø–æ –æ—Å–Ω–æ–≤–Ω—ã–º –∫—É—Ä—Å–∞–º, –∫–Ω–∏–≥–∞–º –∏ —É—á–µ–±–Ω—ã–º —Ä–µ—Å—É—Ä—Å–∞–º Python, –æ–∑–Ω–∞–∫–æ–º—å—Ç–µ—Å—å —Å –Ω–∞—à–∏–º –∏—Å—á–µ—Ä–ø—ã–≤–∞—é—â–∏–º –†—É–∫–æ–≤–æ–¥—Å—Ç–≤–æ –ø–æ –∏–∑—É—á–µ–Ω–∏—é Python .