When you create a function and enter values a, b, and c, How do you find the n value when you satisfy c*n > a + b*n?
I'll send you a coffee gifticon
def stupid_way(a, b, c, n=0):
if c*n > a + b*n :
return n
else:
try:
return stupid_way(a, b, c, n+1)
except:
return False
print(stupid_way(17, 17, 18))
I wrote it like this before I read the answer. Thank you for participating ㅠ<
567 PHP ssh2_scp_send fails to send files as intended
561 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
574 Uncaught (inpromise) Error on Electron: An object could not be cloned
559 Who developed the "avformat-59.dll" that comes with FFmpeg?
830 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
© 2024 OneMinuteCode. All rights reserved.