A simple encryption program using Python I made this encryption program in Python.

I don't have much experience (or any experience at all) about encryption (since I just gave my 9th grade finals), but I had this idea about an algorithm some time back which would enable the user to encrypt words following an algorithm where the program would follow this process for each letter of the entered word; pseudocode:

Let the variable x be the position of the alphabet in the list of alphabets sorted alphabetically
Let the variable y be the position of the alphabet in the entered word
For example, if the user enters 'abcd', the program would find x and y for a, b, c and d one by one
Then, it would find the variable z = 26-x+y and z would be the position of the alphabet in the code 
    in the list of alphabets
In abcd : for a - x = 1, y = 1, so, z = 26-1+1 = 26, so  coded alphabet = 26th alphabet = z
 Similarly, all of a,b,c and d will have coded alphabets as 'z'
 So, 'abcd' will be coded as 'zzzz'


Here's the Python code:

alphabets =['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']

# Defining all sorts of functions

def position(tofind,source):
    size = len(source)
    for i in range(0,size,1):
        if (source[i] == tofind):
            p = i + 1
            break
    return p
def encrypt(a):
    output = []
    sizea = len(a)
    for i in range(0,sizea,1):
        x = i+1
        y = position(a[i],alphabets)
        z = 26-x+y
        if (z&gt;26):
            z = z % 26
        element = alphabets[z-1]
        output.append(element)
    return output
def converttolist(text):
    size = len(text)
    l = []
    for i in range(0,size,1):
        l.append(text[i])
    return l

# The main program

print ()
print ("NOTE : Please enter all the alphabets in lowercase...")
print ()
given = str(input("Please enter the word to be coded : "))
givenlist = converttolist(given)
outputlist = encrypt(givenlist)
print ()
print ("The code for ",given," is :-")
outputlistlength = len(outputlist)
for i in range(0,outputlistlength,1):
    print (outputlist[i],end = "")


Let me know what you think about it.
I think it's a nice project. I would say that the main things for you to work on is getting further acquainted with Python's standard library and with standard practices, which is what most of my advice will be surrounding.

Minor improvements

For your alphabet, you could use ascii_lowercase from string, i.e.: 

from string import ascii_lowercase
alphabet = [character for character in ascii_lowercase]




Unless I'm misreading, your function position() looks like an attempt at recreating list.index(value) (or in your case source.index(tofind)).



"Unneeded" variables can sometimes make sense if they improve readability, but your function:

def converttolist(text):
    size = len(text)
    l = []
    for i in range(0,size,1):
        l.append(text[i])
    return l


would be just as readable if written as:

def converttolist(text):
    l = []
    for i in range(0,len(text),1):
        l.append(text[i])
    return l


and while we're on that particular function, I would strongly recommend having a look at list comprehension---it's both faster and cleaner. Your function would then become:

def convert_to_list(text: str) -&gt; list:
    return [text[i] for i in range(len(txt)]


but I should add that, for cases like this, even better is to just use in-line built-ins like str.split() or [character for character in text].



You don't need to write str(input(&lt;whatever&gt;)) since input already returns a string.



The function range() defaults to step-size 1, so writing range(start, end, 1) is unnecessary.



I would also recommend using a main function for your main loop. You could move all of the stuff in the bottom into a if __name__ == "__main__":, which also would allow you to load in this python script into other programs.

Naming

Remember that Readability counts. The standard in python is to use snake_case for variable names, but more importantly ensure that your names make the variables' purpose clear; avoid names like x and sizea.