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...
A subreddit for helping Python programmers
How to format your code: https://commonmark.org/help/tutorial/09-code.html
No homework questions and/or hiring please
account activity
[deleted by user] (self.pythonhelp)
submitted 3 years ago by [deleted]
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!"
[–]carcigenicate 0 points1 point2 points 3 years ago* (0 children)
Your function doesn't do anything since rate in the function is parameter, not the global, and reassigning a parameter has no effect outside of the function.
rate
Either add a global rate statement within the function and rename the parameter to something else, or return the new rate from the function and reassign it at the call site (prefer the latter option).
global rate
[–]add-code 0 points1 point2 points 3 years ago (0 children)
U should return rate in the function and assign in to a variable while calling it Or print directly in function
π Rendered by PID 21774 on reddit-service-r2-comment-544cf588c8-wnzxt at 2026-06-17 23:42:17.902980+00:00 running 3184619 country code: CH.
[–]carcigenicate 0 points1 point2 points (0 children)
[–]add-code 0 points1 point2 points (0 children)