Created
December 21, 2021 10:24
-
-
Save wulab/c0c432b89b9dae8f86156b394b6b8b49 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def divide(n, d): | |
while True: | |
yield n // d | |
n = (n % d) * 10 | |
def next_n(n, g): | |
return [next(g) for _ in range(n)] | |
def input(number): | |
pi = divide(355, 113) | |
return next_n(number, pi) | |
print(input(number=3)) | |
print(input(number=10)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment