{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "d58f6431-e540-42a6-9fa2-aeeb6b387b17", "metadata": {}, "outputs": [], "source": [ "# tasks" ] }, { "cell_type": "code", "execution_count": 3, "id": "b9b99d19-d677-4582-8210-9ffebd493150", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "task3 (generic function with 1 method)" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "task1() = println(\"$x > $y\")\n", "task2() = println(\"$x < $y\")\n", "task3() = println(\"$x == $y\")" ] }, { "cell_type": "code", "execution_count": 4, "id": "e60f91c9-a8b6-459c-9584-5fb36a6f13aa", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(1, 2)" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "x,y = 1,2" ] }, { "cell_type": "code", "execution_count": 6, "id": "cf61ba10-cb0c-40c8-8a31-88dbd500a36a", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(2, 1)" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "x,y = y,x" ] }, { "cell_type": "code", "execution_count": 7, "id": "d042e37d-e6ef-48a6-a11b-b792fe2bc8d1", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "2 > 1\n" ] } ], "source": [ "if x>y\n", " task1()\n", "elseif x