Created
June 30, 2022 17:21
-
-
Save veretennikovalexey/9cd5f7a54d1b2bc2c869882cec0ffd5c to your computer and use it in GitHub Desktop.
list.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"nbformat": 4, | |
"nbformat_minor": 0, | |
"metadata": { | |
"colab": { | |
"name": "list.ipynb", | |
"provenance": [], | |
"authorship_tag": "ABX9TyOAKSBer8t0g0Yjx6+uABOM", | |
"include_colab_link": true | |
}, | |
"kernelspec": { | |
"name": "python3", | |
"display_name": "Python 3" | |
}, | |
"language_info": { | |
"name": "python" | |
} | |
}, | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "view-in-github", | |
"colab_type": "text" | |
}, | |
"source": [ | |
"<a href=\"https://colab.research.google.com/gist/veretennikovalexey/9cd5f7a54d1b2bc2c869882cec0ffd5c/list.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"id": "pwGL1oGOmH5N", | |
"outputId": "7e552895-ddc9-4440-d3b8-1f88ed1d312b" | |
}, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"name": "stdout", | |
"text": [ | |
"Очень сомнительно\n" | |
] | |
} | |
], | |
"source": [ | |
"import random\n", | |
"\n", | |
"msg = [ 'Это несомненно', 'Это определенно так', 'Да' ]\n", | |
"msg = msg + ['Ответ туманный, попробуй ещё раз', 'Спроси позже' ]\n", | |
"msg = msg + ['Сконцентрируйся и спроси снова', 'Мой ответ - нет']\n", | |
"msg = msg + ['Перспективы не очень хорошие', 'Очень сомнительно' ]\n", | |
"lenmsg = len( msg ) - 1\n", | |
"ii = random.randint( 0, lenmsg )\n", | |
"print( msg[ ii ] )\n", | |
"\n", | |
"# Любит ли меня моя жена ?" | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment