{"id":964,"date":"2021-06-10T11:15:29","date_gmt":"2021-06-10T05:45:29","guid":{"rendered":"https:\/\/cbsepython.in\/?p=964"},"modified":"2021-09-29T22:12:23","modified_gmt":"2021-09-29T16:42:23","slug":"simple-calculator-python-project","status":"publish","type":"post","link":"https:\/\/cbsepython.in\/simple-calculator-python-project\/","title":{"rendered":"Simple Calculator- Python Project for Class 11"},"content":{"rendered":"<p>Simple Calculator- Python Project for Class 11<\/p>\n<p>Source Code:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#Creater info\r\nprint(\"cbsepython.in:\")\r\nprint(\" covering all content for the cbse computer science students                                                                           \")\r\nprint(\"                                                                         \")      \r\nprint(\"These Are the folowing set of Operations you can use :)\")   \r\nprint(\"+ for ADDITION, \",\"- for SUBSTRACTION, \",\" * for MULTIPLICATION, \",\"\/ for DIVISION, \",\"n for Power value\")\r\nprint(\"                                                                        \")      \r\nno=int(input(\"Enter the number of Inputs with which you want to do the operation: \"))\r\n\r\n#max no is 2 and min no is 5       \r\nif no==2:\r\n       number_1=float(input(\"Enter The 1st Number:\"))\r\n       number_2=float(input(\"Enter The 2nd Number:\"))\r\nelif no==3:\r\n        number_1=float(input(\"Enter The 1st Number:\"))\r\n        \r\n        number_2=float(input(\"Enter The 2nd Number:\"))\r\n        number_3=float(input(\"Enter The 3rd Number:\"))\r\nelif no==4:\r\n        number_1=float(input(\"Enter The 1st Number:\"))\r\n        number_2=float(input(\"Enter The 2nd Number:\"))\r\n        number_3=float(input(\"Enter The 3rd Number:\"))\r\n        number_4=float(input(\"Enter The 4th Number:\"))\r\nelif no==5:\r\n        number_1=float(input(\"Enter The 1st Number:\"))\r\n        number_2=float(input(\"Enter The 2nd Number:\"))\r\n        number_3=float(input(\"Enter The 3rd Number:\"))\r\n        number_4=float(input(\"Enter The 4th Number:\"))\r\n        number_5=float(input(\"Enter The 5th Number:\"))\r\nelse:\r\n        print(\"Minimun number with which operation can be done is 2 &amp; Maximum number with which operation can be done is 5\")\r\n\"+ - ADDITION\"\r\n\"- - SUBSTRACTION\"\r\n\"* - MULTIPLICATION\"\r\n\"\/ - DIVISION\"\r\n\"n-to the power\"\r\nuser_input = input(\"Enter the Function to be used:\")\r\nif user_input == \"+\" and no==2:\r\n        number_3=0\r\n        number_4=0\r\n        number_5=0\r\nif user_input == \"+\" and no==3:\r\n        number_4=0\r\n        number_5=0\r\nif user_input == \"+\" and no==4:\r\n        number_5=0\r\nif user_input == \"-\" and no==2:\r\n        number_3=0\r\n        number_4=0\r\n        number_5=0\r\nif user_input == \"-\" and no==3:\r\n        number_4=0\r\n        number_5=0\r\nif user_input == \"-\" and no==4:\r\n        number_5=0\r\nif user_input == \"*\" and no==2:\r\n        number_3=1\r\n        number_4=1\r\n        number_5=1\r\nif user_input == \"*\" and no==3:\r\n        number_4=1\r\n        number_5=1\r\nif user_input == \"*\" and no==4:\r\n        number_5=1\r\nif user_input == \"\/\" and no==2:\r\n        number_3=1\r\n        number_4=1\r\n        number_5=1\r\nif user_input == \"\/\" and no==3:\r\n        number_4=1\r\n        number_5=1\r\nif user_input == \"\/\" and no==4:\r\n        number_5=1\r\nif user_input == \"+\":\r\n    output = number_2 + number_1+ number_3+ number_4+ number_5\r\n    print(output)\r\nelif user_input == \"-\":\r\n    output = number_2 - number_1-number_3- number_4- number_5\r\n    print(output)\r\nelif user_input == \"*\":\r\n    output = number_2 * number_1* number_3* number_4* number_5\r\n    print(output)\r\nelif user_input == \"\/\":\r\n    output = number_1 \/ number_2\/ number_3\/ number_4\/ number_5\r\n    print(output)\r\nelif user_input == \"n\":\r\n    output = number_2 ** number_1\r\n    print(output)\r\nelse:\r\n    print (\"!*!*! Invalid Entry !*!*!\")\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>Output:<\/p>\n<pre>cbsepython.in:\r\ncovering all content for the cbse computer science students \r\n\r\nThese Are the folowing set of Operations you can use :)\r\n('+ for ADDITION, ', '- for SUBSTRACTION, ', ' * for MULTIPLICATION, ', '\/ for DIVISION, ', 'n for Power value')\r\n\r\nEnter the number of Inputs with which you want to do the operation: 4\r\nEnter The 1st Number:3\r\nEnter The 2nd Number:4\r\nEnter The 3rd Number:2\r\nEnter The 4th Number:12\r\nEnter the Function to be used:\"*\"\r\n288.0\r\n&gt;&gt;&gt;<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Simple Calculator- Python Project for Class 11 Source Code: #Creater info print(&#8220;cbsepython.in:&#8221;) print(&#8221; covering all content for the cbse computer science students &#8220;) print(&#8221; &#8220;) print(&#8220;These Are the folowing set of Operations you can use :)&#8221;) print(&#8220;+ for ADDITION, &#8220;,&#8221;- for SUBSTRACTION, &#8220;,&#8221; * for MULTIPLICATION, &#8220;,&#8221;\/ for DIVISION, &#8220;,&#8221;n for Power value&#8221;) print(&#8221; &#8220;) [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[],"class_list":["post-964","post","type-post","status-publish","format-standard","hentry","category-python-projects"],"_links":{"self":[{"href":"https:\/\/cbsepython.in\/wp-json\/wp\/v2\/posts\/964","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cbsepython.in\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cbsepython.in\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cbsepython.in\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/cbsepython.in\/wp-json\/wp\/v2\/comments?post=964"}],"version-history":[{"count":0,"href":"https:\/\/cbsepython.in\/wp-json\/wp\/v2\/posts\/964\/revisions"}],"wp:attachment":[{"href":"https:\/\/cbsepython.in\/wp-json\/wp\/v2\/media?parent=964"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cbsepython.in\/wp-json\/wp\/v2\/categories?post=964"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cbsepython.in\/wp-json\/wp\/v2\/tags?post=964"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}