From f23f0b50a16d42420bb5e2abcc9a5055a5eaf3a2 Mon Sep 17 00:00:00 2001 From: Adityacoder99 <72144604+Adityacoder99@users.noreply.github.com> Date: Thu, 1 Oct 2020 16:08:13 +0530 Subject: [PATCH] Update README.md --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index cba86f0..74b3164 100644 --- a/README.md +++ b/README.md @@ -9,3 +9,25 @@ So to be true to the "real" story I have only gone from 0-50 however higher numb The generator will not work in Python 2 however it can probably be patched to work by doing `from __future__ import division` ![The image](https://i.imgur.com/ZMvUovj.png) + +#Here is code to make a simple calculator using PYTHON + +print("Enter your first number:") +n1 = int(input()) +print("Enter your operation:") +operation = input() +print("Enter your second number:") +n2 = int(input()) + +if operation == "+": + print("Your answer is " , n1 + n2) +elif operation == "-": + print("Your answer is " , n1 - n2) +elif operation == "*": + print("Your answer is " , n1 * n2) +elif operation == "/": + print("Your answer is " , n1 / n2) +elif operation == "**": + print("Your answer is " , n1 ** n2) +else: + print("Invalid Input")