Ad
  • Custom User Avatar

    The lambda function is being bound to the variable test_password, effectively making it a named function. ethan_ is code golfing for fun, which is when you try to complete a challenge with as few characters as possible. Maintainability isn't the goal.

  • Custom User Avatar

    hey man, id say rather just throw it inside a function instead of lambda so it can be used more than just that line and easily modified in the future

  • Custom User Avatar

    This is the nature of Freestyle Sparring. We take turns remixing and refactoring each others code. If you want to make the code shorter, just fork it!🍴

  • Custom User Avatar

    bro im trying to make the code short

  • Custom User Avatar

    My solution uses only 16 digits but still passes all tests.

    I unpublished the challenge because as it is now, it is based on a premise flawed on a very fundamental level.

  • Custom User Avatar

    Unfortunately, but it is very, very far from fixed.

    Your initial value is still a float, and is accurate up to 16 decimal places max. You cannot turn a 16-digit float into a decimal and expect it to automagically restore 9984 missing digits.

    Can you check what reference_pi returns for digits=10000? Does it return 10_000 digits?

  • Custom User Avatar

    done, issue should be fixed now.

  • Custom User Avatar

    fixing...

  • Custom User Avatar

    How exactly returning 10k decimal places works in this task if the return type is float, and float is accurate to 15-16 decimal digits? My solution calculates max 16 digits and passes all tests.

  • Custom User Avatar

    This is very good. will save it and look into.