### Python help? (Solved)

Posted:

**Tue Aug 04, 2015 12:09 pm**I am attempting to write a program to solve for the lowest common denominator in two or more fractions. I am in the very beginning of writing this program and I am running into some trouble with my Argument variable. I am a beginner at programming in python but I am by no means a beginner in the terminology. I programmed in Micro Engineering Labs (Micro code studio) on chips before I started on Python.

I just need a point in the right direction. Thanks in advanced for your help.

Note: I am doing this program to learn Python and be able to teach myself math. I am not in College or school so I am not using this for home work rather I am using it to check my work after I practice a couple math problems on paper.

Terminal output example

I just need a point in the right direction. Thanks in advanced for your help.

Note: I am doing this program to learn Python and be able to teach myself math. I am not in College or school so I am not using this for home work rather I am using it to check my work after I practice a couple math problems on paper.

Code: Select all

```
#Import argument variable.
from sys import argv
#name variables to use; Numerator of fraction and Denominator of fraction
num_N = argv
num_D = argv
prompt = ">"
#Ask for fraction
print "What is the Numerator?"
num_N = raw_input(prompt)
print "What is the Denominator?"
num_D = raw_input(prompt)
#Print fraction before solving for Lowest common denominator
print 'Your fraction is...' $% num_N
print 'Over' $% num_D
```

Code: Select all

```
File "FractLCD.py", line 12
print 'Your fraction is...' $% num_N
^
SyntaxError: invalid syntax
```