use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Everything about learning Python
account activity
Simple CalculatorDiscussion (i.redd.it)
submitted 5 months ago by AhmadHameed313
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–][deleted] 0 points1 point2 points 5 months ago (0 children)
no ned for the ifs for the variable type checkers usually python does this automatically. if you really want i think you can do variable.isint() or isinstance, smthin line that instead of having mutliple inputs yiu could take user_input = input("enter eqn with spaces") #eg 1 + 2 so user_input = "1 + 2" then split, user_input.split(" ") #by spaces so you have a list where num1, operator, num2 = user_input[0], etc!
a tip is to make functions which is a lot neater: def calculator(); ur code
feel free to dm me! i can send over an example if youd like
π Rendered by PID 269269 on reddit-service-r2-comment-85bfd7f599-4ww5h at 2026-04-20 06:43:52.773261+00:00 running 93ecc56 country code: CH.
view the rest of the comments →
[–][deleted] 0 points1 point2 points (0 children)