First time here? Check out the FAQ!

Ask Your Question

Revision history [back]

click to hide/show revision 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))

click to hide/show revision 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))

click to hide/show revision 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))

click to hide/show revision 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 item]

item]

b = [insert list deleting first item]

item]

for x, y in zip(b, a): print(fractions.Fraction(x, y))

y))
click to hide/show revision 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))
click to hide/show revision 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))