mardi 19 février 2019

Unexpected Identation

I am trying to run the function and send the Data gathered in this function to another appropriate function. Getting indent error at TypeOfEncrypt == 1:

def main():

        FileToRead =  input("Select the File in Directory :")


        File = open("C:\\Users\\User\\Documents\\" + FileToRead + ".txt", 'r')

        Data = File.read()

        File.close()

        print (Data)

        if Data != None :
            TypeOfCipher = int(input("For Encrypt Press 1 and 2 for Decrypt?"))

            if TypeOfCipher == 1 :  
                TypeOfEncrypt = int(input("Press 1. Polyalphabatic, 2. Transposition, 3. Bit-wise")
                if TypeOfEncrypt == 1 : 
                    print (TypeOfEncrypt)

        return None

Aucun commentaire:

Enregistrer un commentaire