Program to accept numbers, then calculate the mean, median, and range I created a basic program that allows a user to continuously input values until he or she is satisfied; furthering, the program outputs the mean, median, and range. Then, the code gives you the option to run it again or exit.

#Mean, median, and range
from clear import *
def main():
    clear()
    list_one = []
    while True:
        q = input('Type a number or type stop at any time: ').lower()
        if q.isnumeric():
            list_one.append(int(q))
            print('''
Great choice! Choose again or type stop the sequence.''')
        elif q == 'stop':
            list_one.sort(key=int)
            print('''
And the values are...''')

            def mean():
                return 'Mean: ' + str(sum(list_one)/len(list_one))

            def median():
                length = len(list_one)
                if length % 2 == 0:
                    return  'Median: ' + str(sum(list_one[length//2-1:length//2+1])/2)
                else:
                    return 'Median: ' + str(list_one[length//2])

            def range_():
                return 'Range: ' + str(list_one[-1] - list_one[0])

            print(mean())
            print(median())
            print(range_())
            break

        else:
            print('''
That\'s not a number or stop! Try again brudda man.
''')

def end():
    while True:
        q = input('Type anything and and press enter to repeat or press only \'Enter\' to exit. ')
        if len(q) &gt;= 1:
            main()
            break
        else:
            exit()
main()

while True:
    q = input('''
Type anything and and press enter to repeat or press only \'Enter\' to exit. ''')
    if len(q) &gt;= 1:
        main()
    else:
        clear()
        exit()


Additionally, the "clear" library that I imported is a custom library of my making which only prints out a ton of blank lines so the script "clears" and outputs are then at the bottom. If there is a better way of doing this please let me know.

I want to get familiar with what is "right" or "wrong" in terms of programming with Python. I would like my work to look professional and practice more respected coding ethics, so please be as harsh as you wish.
On top of Thomas Ward answer, here is a short and important comment:

More beautiful functions

Your functions are performing some mathematical computations and handling the formatting to show the result to the 2 users. These correspond to 2 concerns that could be separated.

Also, your functions rely on the list_one global variable. It would be clearer to have this provided to the functions using an argument.

You'd have something like:

def mean(lst):
    return sum(lst) / len(lst)

def range_(lst):
    return lst[-1] - lst[0]

def median(lst):
    length = len(lst)
    if length % 2 == 0:
        return sum(lst[length//2-1:length//2+1]) / 2
    else:
        return lst[length//2]


...
            print('Mean: ' + str(mean(list_one)))
            print('Median: ' + str(median(list_one)))
            print('Range: ' + str(range_(list_one)))


These are easier to understand and to reason about. They are also easier to test. This is an interesting exercise that you can try to practice.

Small improvements in median

The expression length//2 is used in multiple places which makes the code tedious to read and less efficient than it could be.
Using a temporary variable makes things clearer:

def median(lst):
    length = len(lst)
    mid = length//2
    if length % 2 == 0:
        return sum(lst[mid-1:mid+1]) / 2
    else:
        return lst[mid]


From here, I think it's pretty good already. Let's see what can be still be done for the sake of learning new techniques.

When you want to compute both the quotient and the remainder of the division, you can use "/" and "%" just like you did. Another option is to use the divmod builtin which returns both directly:

def median(lst):
    length = len(lst)
    mid, rem = divmod(length, 2)
    if rem == 0:
        return sum(lst[mid-1:mid+1]) / 2
    else:
        return lst[mid]


The operation sum(lst[mid-1:mid+1]) / 2 looks a lot like things we've just somewhere else: we compute the sum of a list and we divide by the number of elements which is happens to be 2.

We could reuse our mean function here.

def median(lst):
    length = len(lst)
    mid, rem = divmod(length, 2)
    if rem == 0:
        return mean(lst[mid-1:mid+1])
    else:
        return lst[mid]


To go further, we could use the ternary operator to have a single return value.
We could also use the fact that in a boolean context, non-zero integers are equivalent to True and zero is equivalent to false.
This would lead to the following code which is, from my point of view, not really better:

def median(lst):
    length = len(lst)
    mid, rem = divmod(length, 2)
    return lst[mid] if rem else mean(lst[mid-1:mid+1])