JustCaptain kod-buduschego
a33efd81ebf0db5852b9ec96a0cc46460ae2a4b0
Перейти к файлу
Код
kod-buduschego Python 2025-20263.3. Возврат значений из функции. Оператор returnboardоператор return 2026-04-27.excalidraw
anc update c70a58f 8 октября 2026 г.
оператор return 2026-04-27.excalidraw
{
  "type": "excalidraw",
  "version": 2,
  "source": "https://excalidraw.com",
  "elements": [
    {
      "id": "nMw85siBPH5t_DTQAsbEP",
      "type": "text",
      "x": 492,
      "y": 183.5,
      "width": 847,
      "height": 245,
      "angle": 0,
      "strokeColor": "#1e1e1e",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "index": "b1A",
      "roundness": null,
      "seed": 230342349,
      "version": 200,
      "versionNonce": 2109760454,
      "isDeleted": true,
      "boundElements": [
        {
          "id": "yJJQS7KpwL4-EF3EjZTb4",
          "type": "arrow"
        }
      ],
      "updated": 1777359923795,
      "link": null,
      "locked": false,
      "text": "def sum(a: int | float, b: int | float) -> int | float:\n    result: int | float = a + b\n    return result\n\n\nx: int | float = sum(a=5, b=10)\nprint(x)",
      "fontSize": 28,
      "fontFamily": 8,
      "textAlign": "left",
      "verticalAlign": "top",
      "containerId": null,
      "originalText": "def sum(a: int | float, b: int | float) -> int | float:\n    result: int | float = a + b\n    return result\n\n\nx: int | float = sum(a=5, b=10)\nprint(x)",
      "autoResize": true,
      "lineHeight": 1.25
    },
    {
      "id": "CqLlKQnfluQajVObGtmxg",
      "type": "line",
      "x": 553,
      "y": 285,
      "width": 95,
      "height": 0,
      "angle": 0,
      "strokeColor": "#1971c2",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "index": "b1B",
      "roundness": {
        "type": 2
      },
      "seed": 62858925,
      "version": 52,
      "versionNonce": 129835930,
      "isDeleted": true,
      "boundElements": [],
      "updated": 1777359923795,
      "link": null,
      "locked": false,
      "points": [
        [
          0,
          0
        ],
        [
          95,
          0
        ]
      ],
      "startBinding": null,
      "endBinding": null,
      "startArrowhead": null,
      "endArrowhead": null,
      "polygon": false
    },
    {
      "id": "3_5S3RTWq9jCX0UASZTFG",
      "type": "line",
      "x": 753,
      "y": 390,
      "width": 47,
      "height": 0,
      "angle": 0,
      "strokeColor": "#2f9e44",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "index": "b1C",
      "roundness": {
        "type": 2
      },
      "seed": 1839117187,
      "version": 42,
      "versionNonce": 952892166,
      "isDeleted": true,
      "boundElements": [],
      "updated": 1777359923795,
      "link": null,
      "locked": false,
      "points": [
        [
          0,
          0
        ],
        [
          47,
          0
        ]
      ],
      "startBinding": null,
      "endBinding": null,
      "startArrowhead": null,
      "endArrowhead": null,
      "polygon": false
    },
    {
      "id": "YI39g6o_yAAwWT5lHwN9J",
      "type": "line",
      "x": 819,
      "y": 391,
      "width": 44,
      "height": 0,
      "angle": 0,
      "strokeColor": "#f08c00",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "index": "b1D",
      "roundness": {
        "type": 2
      },
      "seed": 2017456067,
      "version": 30,
      "versionNonce": 105488474,
      "isDeleted": true,
      "boundElements": [],
      "updated": 1777359923795,
      "link": null,
      "locked": false,
      "points": [
        [
          0,
          0
        ],
        [
          44,
          0
        ]
      ],
      "startBinding": null,
      "endBinding": null,
      "startArrowhead": null,
      "endArrowhead": null,
      "polygon": false
    },
    {
      "id": "v0M0Cy65hHARxqXmqkg2a",
      "type": "line",
      "x": 894,
      "y": 390,
      "width": 60,
      "height": 0,
      "angle": 0,
      "strokeColor": "#f08c00",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "index": "b1E",
      "roundness": {
        "type": 2
      },
      "seed": 1216362189,
      "version": 28,
      "versionNonce": 350399046,
      "isDeleted": true,
      "boundElements": [],
      "updated": 1777359923795,
      "link": null,
      "locked": false,
      "points": [
        [
          0,
          0
        ],
        [
          60,
          0
        ]
      ],
      "startBinding": null,
      "endBinding": null,
      "startArrowhead": null,
      "endArrowhead": null,
      "polygon": false
    },
    {
      "id": "yJJQS7KpwL4-EF3EjZTb4",
      "type": "arrow",
      "x": 929,
      "y": 394,
      "width": 676,
      "height": 322,
      "angle": 0,
      "strokeColor": "#f08c00",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "index": "b1F",
      "roundness": {
        "type": 2
      },
      "seed": 1317223011,
      "version": 392,
      "versionNonce": 531137818,
      "isDeleted": true,
      "boundElements": [],
      "updated": 1777359923795,
      "link": null,
      "locked": false,
      "points": [
        [
          0,
          0
        ],
        [
          528,
          -154
        ],
        [
          346,
          -322
        ],
        [
          -139,
          -261
        ],
        [
          -148,
          -224
        ]
      ],
      "startBinding": {
        "elementId": "nMw85siBPH5t_DTQAsbEP",
        "mode": "inside",
        "fixedPoint": [
          0.5159386068476978,
          0.8591836734693877
        ]
      },
      "endBinding": {
        "elementId": "nMw85siBPH5t_DTQAsbEP",
        "mode": "inside",
        "fixedPoint": [
          0.3412042502951594,
          -0.05510204081632653
        ]
      },
      "startArrowhead": null,
      "endArrowhead": "arrow",
      "elbowed": false,
      "moveMidPointsWithElement": true
    },
    {
      "id": "jHIkDwB74UVg4e2fcPksU",
      "type": "rectangle",
      "x": 608,
      "y": 175,
      "width": 468.9999999999999,
      "height": 45,
      "angle": 0,
      "strokeColor": "#f08c00",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "index": "b1I",
      "roundness": {
        "type": 3
      },
      "seed": 956708675,
      "version": 145,
      "versionNonce": 1893822854,
      "isDeleted": true,
      "boundElements": [],
      "updated": 1777359923795,
      "link": null,
      "locked": false
    },
    {
      "id": "KHWy-MlWac-FOiNxO5Ras",
      "type": "text",
      "x": 482,
      "y": 437.5,
      "width": 308,
      "height": 35,
      "angle": 0,
      "strokeColor": "#1e1e1e",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "index": "b1J",
      "roundness": null,
      "seed": 67030243,
      "version": 24,
      "versionNonce": 491573722,
      "isDeleted": true,
      "boundElements": [],
      "updated": 1777359923795,
      "link": null,
      "locked": false,
      "text": "print(sum(a=3, b=5))",
      "fontSize": 28,
      "fontFamily": 8,
      "textAlign": "left",
      "verticalAlign": "top",
      "containerId": null,
      "originalText": "print(sum(a=3, b=5))",
      "autoResize": true,
      "lineHeight": 1.25
    },
    {
      "id": "hw6ebv49gatTNG8nXsE9d",
      "type": "text",
      "x": 567,
      "y": 539.5,
      "width": 739.2000122070312,
      "height": 175,
      "angle": 0,
      "strokeColor": "#e03131",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "index": "b1K",
      "roundness": null,
      "seed": 1810712685,
      "version": 160,
      "versionNonce": 1208307910,
      "isDeleted": true,
      "boundElements": [],
      "updated": 1777359923795,
      "link": null,
      "locked": false,
      "text": "def sum(a: int | float, b: int | float) -> None:\n    result: int | float = a + b\n\nx = sum(a=5, b=10)\nprint(x) # None",
      "fontSize": 28,
      "fontFamily": 8,
      "textAlign": "left",
      "verticalAlign": "top",
      "containerId": null,
      "originalText": "def sum(a: int | float, b: int | float) -> None:\n    result: int | float = a + b\n\nx = sum(a=5, b=10)\nprint(x) # None",
      "autoResize": true,
      "lineHeight": 1.25
    },
    {
      "id": "8h1EWvCVSdz1hYocfR4Hj",
      "type": "text",
      "x": 674,
      "y": 81.5,
      "width": 524.8666381835938,
      "height": 45,
      "angle": 0,
      "strokeColor": "#1e1e1e",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "index": "b1L",
      "roundness": null,
      "seed": 946869466,
      "version": 129,
      "versionNonce": 1987912774,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1777359961946,
      "link": null,
      "locked": false,
      "text": "Оператор return в функции",
      "fontSize": 36,
      "fontFamily": 8,
      "textAlign": "left",
      "verticalAlign": "top",
      "containerId": null,
      "originalText": "Оператор return в функции",
      "autoResize": true,
      "lineHeight": 1.25
    },
    {
      "id": "p8KBkLZwKhdHlihKvR1CW",
      "type": "text",
      "x": 223,
      "y": 194.5,
      "width": 594,
      "height": 135,
      "angle": 0,
      "strokeColor": "#1e1e1e",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "index": "b1M",
      "roundness": null,
      "seed": 606077446,
      "version": 168,
      "versionNonce": 1929599898,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1777360039337,
      "link": null,
      "locked": false,
      "text": "def add(a: int, b:int) -> int:\n    result: int = a + b\n    return result",
      "fontSize": 36,
      "fontFamily": 8,
      "textAlign": "left",
      "verticalAlign": "top",
      "containerId": null,
      "originalText": "def add(a: int, b:int) -> int:\n    result: int = a + b\n    return result",
      "autoResize": true,
      "lineHeight": 1.25
    },
    {
      "id": "ekHakJ3xlUUaSr1ur12Ub",
      "type": "text",
      "x": 936,
      "y": 192.5,
      "width": 752.4000244140625,
      "height": 135,
      "angle": 0,
      "strokeColor": "#1e1e1e",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "index": "b1N",
      "roundness": null,
      "seed": 2118431558,
      "version": 93,
      "versionNonce": 785263750,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1777360038029,
      "link": null,
      "locked": false,
      "text": "def print_add(a: int, b:int) ->  None:\n    result: int = a + b\n    print(result)",
      "fontSize": 36,
      "fontFamily": 8,
      "textAlign": "left",
      "verticalAlign": "top",
      "containerId": null,
      "originalText": "def print_add(a: int, b:int) ->  None:\n    result: int = a + b\n    print(result)",
      "autoResize": true,
      "lineHeight": 1.25
    },
    {
      "id": "ujxzMkB7HXVK7nuJ11jX0",
      "type": "rectangle",
      "x": 732,
      "y": 180,
      "width": 89,
      "height": 62,
      "angle": 0,
      "strokeColor": "#f08c00",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "index": "b1O",
      "roundness": {
        "type": 3
      },
      "seed": 2092154522,
      "version": 64,
      "versionNonce": 752932506,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1777360052855,
      "link": null,
      "locked": false
    },
    {
      "id": "ujiJ4xCQIm7Zt1-710Qr0",
      "type": "rectangle",
      "x": 1579.5,
      "y": 176,
      "width": 118,
      "height": 62,
      "angle": 0,
      "strokeColor": "#f08c00",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "index": "b1P",
      "roundness": {
        "type": 3
      },
      "seed": 76113114,
      "version": 88,
      "versionNonce": 552957658,
      "isDeleted": false,
      "boundElements": [],
      "updated": 1777360057134,
      "link": null,
      "locked": false
    },
    {
      "id": "JrEtkCCkYucSSOPusPdrI",
      "type": "rectangle",
      "x": 296.5,
      "y": 285,
      "width": 271.99999999999994,
      "height": 62,
      "angle": 0,
      "strokeColor": "#f08c00",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "index": "b1Q",
      "roundness": {
        "type": 3
      },
      "seed": 1317465370,
      "version": 113,
      "versionNonce": 1115839962,
      "isDeleted": false,
      "boundElements": [],
      "updated": 1777360061625,
      "link": null,
      "locked": false
    },
    {
      "id": "hMO0L4O5gntNLbBxQWRro",
      "type": "rectangle",
      "x": 1003.5,
      "y": 275,
      "width": 291.00000000000006,
      "height": 62,
      "angle": 0,
      "strokeColor": "#f08c00",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "index": "b1R",
      "roundness": {
        "type": 3
      },
      "seed": 1485605702,
      "version": 108,
      "versionNonce": 322652934,
      "isDeleted": false,
      "boundElements": [],
      "updated": 1777360065305,
      "link": null,
      "locked": false
    },
    {
      "id": "ZZ3zr6YW38MfJ27ZMKH7g",
      "type": "text",
      "x": 220,
      "y": 392.5,
      "width": 376.20001220703125,
      "height": 90,
      "angle": 0,
      "strokeColor": "#1e1e1e",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "index": "b1S",
      "roundness": null,
      "seed": 962184410,
      "version": 46,
      "versionNonce": 937588570,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1777360177165,
      "link": null,
      "locked": false,
      "text": "x: int = add(5, 10)\nprint(x) => 15",
      "fontSize": 36,
      "fontFamily": 8,
      "textAlign": "left",
      "verticalAlign": "top",
      "containerId": null,
      "originalText": "x: int = add(5, 10)\nprint(x) => 15",
      "autoResize": true,
      "lineHeight": 1.25
    },
    {
      "id": "U08BlZz4nkT3rLOQcBGFv",
      "type": "text",
      "x": 950,
      "y": 380.5,
      "width": 613.7999877929688,
      "height": 90,
      "angle": 0,
      "strokeColor": "#1e1e1e",
      "backgroundColor": "transparent",
      "fillStyle": "solid",
      "strokeWidth": 2,
      "strokeStyle": "solid",
      "roughness": 1,
      "opacity": 100,
      "groupIds": [],
      "frameId": null,
      "index": "b1T",
      "roundness": null,
      "seed": 451583770,
      "version": 72,
      "versionNonce": 231714906,
      "isDeleted": false,
      "boundElements": null,
      "updated": 1777360295947,
      "link": null,
      "locked": false,
      "text": "x: None = print_add(5, 10) # 15\nprint(x) => None",
      "fontSize": 36,
      "fontFamily": 8,
      "textAlign": "left",
      "verticalAlign": "top",
      "containerId": null,
      "originalText": "x: None = print_add(5, 10) # 15\nprint(x) => None",
      "autoResize": true,
      "lineHeight": 1.25
    }
  ],
  "appState": {
    "gridSize": 20,
    "gridStep": 5,
    "gridModeEnabled": false,
    "viewBackgroundColor": "#fffce8",
    "lockedMultiSelections": {}
  },
  "files": {}
}