Last active
June 30, 2019 12:02
-
-
Save goedel-gang/d90b37b1f760ecaf54f4c61295b76d7f to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/bash | |
# https://unix.stackexchange.com/a/527714/347199 | |
mkfifo mypipe | |
trap 'rm -f mypipe' EXIT | |
printf '%d\n%d\n' 0 1 >mypipe & | |
python3 -c ' | |
number_phile = open(3, "w") | |
n = 50 | |
b = int(input()) | |
for _ in range(n): | |
a, b = b, int(input()) | |
print(a + b, file=number_phile, flush=True) | |
print("F_{} = {}".format(n, b))' <mypipe 3>mypipe |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment