Random numbers do not change, repeats twice
<pre><code>import random

def main():
    counter = StudentNames()
    StudentName = StudentNames()

    AverageRight = 0.0
    Right = 0.0

    numberone = Numbers(counter)
    numbertwo = NumbersTwo(counter)

    numberone = Equation(numberone, numbertwo)
    numbertwo = Equation(numberone, numbertwo)

    anwser = 0.0

def StudentNames():
    print("Student Name")

    StudentName = input("")
    print("Pick a Numeral Between One And Ten")

    counter = int(input(""))
    return counter
    return StudentName

def Equation(numberone, numbertwo):
    print("Enter Total [A Number Between One And Ten]")
    Total = int(input(""))

    while Total &gt; 10:
         Total = Total + 1
         print("What Is The Answer To This Equation")
         print(numberone, "+", numbertwo)

         answer = int(input(""))
         answerOne = numberone + numbertwo

        if answer == answerOne:
            print("Correct")
            Correct = range(1, 10)
            Correct = Correct + 1
            print(Correct)
        else:
            print("Incorrect")
            incorrect = range(1, 10)
            print(incorrect)

def Numbers(counter):
    while counter &gt; 10:
        counter = counter + 1
        numberone = random.randrange(1*2, 500*2)
        return numberone
</code></pre>

<p>My random numbers won't change unless I restart the loop, the <code>StudentNames</code> module repeats exactly twice and I have no idea why.</p>

<p>Try this ... You can only return one value from a function but you can return a "tuple" (a sequence of objects), and pick it up in main the same way:</p>

<pre><code>def main():
    counter, StudentName = StudentNames()

def StudentNames():
    ... ... ...
    return counter, StudentName
</code></pre>

<p>For the random numbers, you don't need a counter </p>

<pre><code>def Numbers():
    n = random.randrange(1*2, 500*2)
    return n
</code></pre>

<p>and call it like this - each call will generate a fresh random number</p>

<pre><code>numberone = Numbers()
numbertwo = Numbers()
</code></pre>

python loops random