Last active
April 2, 2022 10:19
-
-
Save alfredplpl/58be63aa5d3ea8fce750d6da59123869 to your computer and use it in GitHub Desktop.
5**pi_is_not_in_Z.ipynb
This file contains hidden or 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": "5**pi_is_not_in_Z.ipynb", | |
| "provenance": [], | |
| "authorship_tag": "ABX9TyOPpMAyOVUmwYFH5Paq7/Ue", | |
| "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/alfredplpl/58be63aa5d3ea8fce750d6da59123869/5-pi_is_not_in_z.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": "U35LmL_roSHh", | |
| "outputId": "45a12f5b-b73f-452c-9164-bc7264d55b7b" | |
| }, | |
| "outputs": [ | |
| { | |
| "output_type": "stream", | |
| "name": "stdout", | |
| "text": [ | |
| "5**pi is not in Z\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "import math\n", | |
| "\n", | |
| "EPS=1e-6\n", | |
| "is_in_Z=False\n", | |
| "for i in range(5**3,5**4):\n", | |
| " if(abs(math.pi-math.log(i)/math.log(5))<EPS):\n", | |
| " is_in_Z=True\n", | |
| "if(is_in_Z):\n", | |
| " print(\"I do not know that 5**pi is in Z\")\n", | |
| "else:\n", | |
| " print(\"5**pi is not in Z\")" | |
| ] | |
| } | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment