| 1 | initial version |
The answer is to use Python:
import fractions
a = [insert list, deleting last item]
b = [insert list deleting first item]
for x, y in zip(b, a): print(fractions.Fraction(x, y))
| 2 | No.2 Revision |
Note: I added this answer before I saw that FrédéricC had provided an answer using SM, which is perfect. I have not deleted my answer, since I think it might help other beginners like me understand Python in addition to SM.
The answer is to use Python:
import fractions
a = [insert list, deleting last item]
b = [insert list deleting first item]
for x, y in zip(b, a): print(fractions.Fraction(x, y))
| 3 | No.3 Revision |
Note: I added this answer before I saw that FrédéricC had provided an answer using SM, Sage, which is perfect. I have not deleted my answer, since I think it might help other beginners like me understand Python in addition to SM.Sage.
The answer is to use Python:
import fractions
a = [insert list, deleting last item]
b = [insert list deleting first item]
for x, y in zip(b, a): print(fractions.Fraction(x, y))
| 4 | No.4 Revision |
Note: I added this answer before I saw that FrédéricC had provided an answer using Sage, which is perfect. I have not deleted my answer, since I think it might help other beginners like me understand Python in addition to Sage.
The answer is to use Python:
import fractions
a = [insert list, deleting last | 5 | No.5 Revision |
Note: I added this answer before I saw that FrédéricC had provided an answer using Sage, which is perfect. I have not deleted my answer, since I think it might help other beginners like me understand Python in addition to Sage.
The answer is to use Python:
import fractions
import fractions
a = [insert list, deleting last item]
b = [insert list deleting first item]
for x, y in zip(b, a):
print(fractions.Fraction(x, y))
| 6 | No.6 Revision |
Note: I added this answer before I saw that FrédéricC had provided an answer using Sage, which is perfect. I have not deleted my answer, since I think it might help other beginners like me understand Python in addition to Sage.
The answer Another solution is to use Python:
import fractions
a = [insert list, deleting last item]
b = [insert list deleting first item]
for x, y in zip(b, a):
print(fractions.Fraction(x, y))
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.