Question: I am writing a basic program to conjugate verbs in Spanish. I currently have two files: main.py and test.py. I am using test.py to test the function.  

currently main.py has:

```
import test as present

print("Welcome to Spanish Verb Conjugator")
verb = raw_input("Enter the verb: ")
length = len(verb)

#print(length)

v1 = length - 2
r1 = length - 1
v = verb[v1]
r = verb[r1]
end = str(v+r)
stem = verb[0:v1]

tense = raw_input("Choose your tense: ")
if tense == "present":
    test.testt(end)

```

at the end I tried to call the testt function which is on test.py
test.py has:

```
import main 

def testt(ending):
    if ending == "ar":
        form = raw_input("Form: ")
        if form == "yo":
            return form + " " + stem + "o"

```

My error is: 

```
Traceback (most recent call last):
  File "/home/ubuntu/workspace/main.py", line 1, in <module>
    import test
  File "/home/ubuntu/workspace/test.py", line 1, in <module>
    import main 
  File "/home/ubuntu/workspace/main.py", line 19, in <module>
    test.testt(end)
AttributeError: 'module' object has no attribute 'testt'

```

I am using python 2.

Answer: 
Change you code in main.py to :

```
import test 

print("Welcome to Spanish Verb Conjugator")
verb = raw_input("Enter the verb: ")
length = len(verb)

#print(length)

v1 = length - 2
r1 = length - 1
v = verb[v1]
r = verb[r1]
end = str(v+r)
print end
stem = verb[0:v1]

tense = raw_input("Choose your tense: ")
if tense == "present":
    test.testt(end)

```

and change test.py to:

```
def testt(ending):
    if ending == "ar":
        form = raw_input("Form: ")
        if form == "yo":
            return form + " " + stem + "o"

```

**Moreover**,

`stem` won't work in `test.py` as it is defined in `main.py`
You are importing `test` as `present`. Instead of using `test.testt()` use `present.testt()`. Moreover your code suffers from `circular import` problem. [Circular Import Problem](https://stackabuse.com/python-circular-imports/)