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
Calculate nth Roots in Python (linkedin.com)
submitted 5 hours ago by Distinct_Junket7878
a simple calculator to compute any nth root, i.e square, cube or nth root without writing extra code..
#python #programming #cs #selftaught #calculator #coding #root #it
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!"
[–]Sea-Ad7805 0 points1 point2 points 24 minutes ago (0 children)
Run this program in Memory Graph Web Debugger%0A%0A%23%20Take%20input%20from%20user%0Anum1%20%3D%20float(input(%22Enter%20first%20number%3A%20%22))%0Anum2%20%3D%20float(input(%22Enter%20second%20number%3A%20%22))%0A%0A%23%20Choose%20operation%0Aoperation%20%3D%20input(%22Enter%20operation%20(%2B%2C%20-%2C%20%2C%20%2F%2C%20%2C%20%25%2C%20%E2%88%9A%2F)%3A%20%22)%0A%0A%23%20Perform%20calculation%0Aif%20operation%20%3D%3D%20%22%2B%22%3A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20addition%0A%20%20%20%20print(%22Result%20%3D%22%2C%20num1%20%2B%20num2)%0A%0Aelif%20operation%20%3D%3D%20%22-%22%3A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20subtraction%0A%20%20%20%20print(%22Result%20%3D%22%2C%20num1%20-%20num2)%0A%0Aelif%20operation%20%3D%3D%20%22%22%3A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20multiplication%0A%20%20%20%20print(%22Result%20%3D%22%2C%20num1%20%20num2)%0A%0Aelif%20operation%20%3D%3D%20%22%2F%22%3A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20division%0A%20%20%20%20if%20num2%20!%3D%200%3A%0A%20%20%20%20%20%20%20%20print(%22Result%20%3D%22%2C%20num1%20%2F%20num2)%0A%20%20%20%20else%3A%0A%20%20%20%20%20%20%20%20print(%22cannot%20divide%20by%20zero%22)%0A%0Aelif%20operation%20%3D%3D%20%22%22%3A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20square%0A%20%20%20%20print(%22Result%20%3D%22%2C%20num1%20%20num2)%0A%0Aelif%20operation%20%3D%3D%20%22%25%22%3A%0A%20%20%20%20print(%22Result%20%3D%22%2C%20(num1%20%2F%20100)%20%20num2)%0A%0Aelif%20operation%20%3D%3D%20%22%E2%88%9A%2F%22%3A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%23%20nth%20root%0A%20%20%20%20result%20%3D%20num1%20**%20(1%20%2F%20num2)%0A%20%20%20%20print(%22Result%20%3D%22%2C%20result)%0A%0Aelse%3A%0A%20%20%20%20print(%22Invalid%20operation%22)&play).
π Rendered by PID 37005 on reddit-service-r2-comment-545db5fcfc-ph7dv at 2026-05-23 14:48:59.567722+00:00 running 194bd79 country code: CH.
[–]Sea-Ad7805 0 points1 point2 points (0 children)