import time
print("Niki Assistant 1.0 [1.0.0.21010]")
print("Copyright \xA9 Group B 2018-2021")
reg=["errors","pptat","pptver","version"]
regValues=[["Non-command detected", "Non parameters detected","Cannot complete the command","No presentations attached"],"China","Development Version Anniversary Update [4.0.2104.0]","Group B Niki Assistant Version 1.0 [1.0.0.21010]"]
errors=regValues[0]
pptat=regValues[1]
pptver=regValues[2]
version=regValues[3]
ei=0
pai=1
pvi=2
vi=3
while True:
    com=input("Type a command> ")
    if com=="help":
        print ("Commands:\nHELP\tDisplays help\nVER\tShows Niki Assistant's Version\nPPTVER\t Shows Attached Powerpoint's Version\nREG\tShows and edits registry settings\nEXIT\tLeaves Niki Assistant\nEvery command must be written in lowercase.")
    elif com=="ver":
        try:
            print(version)
        except:
            print("Cannot complete the command. Variable 'version' does not exist or it is not readable.")
    elif com=="pptver":
        try:
            if pptat!="":
                if pptver!="":
                    print(pptat+": "+pptver)
                else:
                    try:
                        print(errors[2])
                    except:
                        print("An error occured")
            else:
                try:
                    print(errors[3])
                except:
                    print("An error occured")
        except:
            print("Cannot complete the command. Variables 'pptat' and 'pptver' do not exist or they are not readable.")
    elif com=="reg":
        par=input("Enter parameter: (s/e/d): ")
        if par=="s":
            try:
                print(reg)
                print(regValues)
            except:
                print("Cannot complete the command. Registry is damaged or destroyed.")
        elif par=="e":
            edit=input("Choose a variable: ")
            try:
                if edit in reg:
                    valedit=input("Now edit its value: ")
                    if edit=="errors":
                        errors=""
                        regValues[ei]=valedit
                        errors=regValues[ei]
                    elif edit=="pptat":
                        pptat=""
                        regValues[pai]=valedit
                        pptat=regValues[pai]
                    elif edit=="pptver":
                        pptver=""
                        regValues[pvi]=valedit
                        pptver=regValues[pvi]
                    elif edit=="version":
                        version=""
                        regValues[vi]=valedit
                        version=regValues[vi]
                    else:
                        try:
                            print(errors[2])
                        except:
                            print("An error occured")
                else:
                    try:
                        print(errors[2])
                    except:
                        print("An error occured")
            except:
                print("Cannot complete the command. Registry is damaged or destroyed.")
        elif par=="d":
            try:
                delete=input("Choose a variable: ")
                if delete in reg or delete=="all":
                    if delete=="errors":
                        del errors
                        reg.pop(ei)
                        regValues.pop(ei)
                        del ei
                        pai=0
                        pvi=1
                        vi=2
                    elif delete=="pptat":
                        del pptat
                        reg.pop(pai)
                        regValues.pop(pai)
                        del pai
                        pvi=1
                        vi=2
                    elif delete=="pptver":
                        del pptver
                        reg.pop(pvi)
                        regValues.pop(pvi)
                        del pvi
                        vi=2
                    elif delete=="version":
                        del version
                        reg.pop(vi)
                        regValues.pop(vi)
                        del vi
                    elif delete=="all":
                        del errors
                        del pptat
                        del pptver
                        del version
                        del ei
                        del pai
                        del pvi
                        del vi
                        del reg
                        del regValues
                    else:
                        try:
                            print(errors[2])
                        except:
                            print("An error occured")
                else:
                    try:
                        print(errors[2])
                    except:
                        print("An error occured")
            except:
                print("Cannot complete the command. Registry is damaged or destroyed.")
        else:
            try:
                print(errors[1])
            except:
                print
                ("An error occured")
    elif com=="exit":
        print("Leaving Niki Assistant...")
        break
    elif com=="Hello!":
        print("Hello!")
    elif com=="die":
        print("Ok")
        break
    elif com=="among us":
        q=input("Do you want to play? (Y/N)")
        if q=="Y":
            print("Code : GNMYHF")
        elif q=="N":
            print("I'm gonna play alone.")
        else:
            print("What????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????")
    elif com=="who are you":
        print("I am niki. I am only some days old.")
    elif com=="hey cortana" or com=="hey siri" or com=="hey google" or com=="hey maic" or com=="hey alexa" or com=="hey bixbi":
        print("HEY! I AM NIKI ASSISTANT YOU DUMB PERSON!!!!!!!!!!!!!!!!!")
        time.sleep(3)
        print("AND I'M GONNA KICK YOU RIGHT NOW!!!!!!!!!!!!!!!!!!!")
        time.sleep(2)
        break
    elif com=="I am a noob":
        print("You are")
    elif com=="You are a noob":
        print("No, you are")
        print("Fred Drust says: oops, sorry noob")
    elif com=="no escape":
        time.sleep(2)
        print("THERE IS NO ESCAPE NOW.")
        time.sleep(2)
        print("DO NOT TRY TO CLOSE THIS WINODOW,\nYOUR COMPUTER IS NOW DONE FOR ANYWAY")
        time.sleep(2)
        ne=input("DO YOU WANT TO ENJOY THE LAST MINUTES\nUSING YOUR COMUTER? ")
        if ne=="yes":
            time.sleep(2)
            print("GOOD LUCK.")
            time.sleep(1)
            del errors
            del pptat
            del pptver
            del version
            del ei
            del pai
            del pvi
            del vi
            del reg
            del regValues
            for i in range (0,20):
                com=input("Type a command> ")
                print("An error occured")
            for i in range (0,1000):
                print("No escape")
                time.sleep(0.002)
            print("Niki assistant is corrupted")
            break
        else:
            for i in range (0,1000):
                print("No escape")
                time.sleep(0.002)
            print("Niki assistant is corrupted")
            break
    else:
        try:
            print(errors[0])
        except:
            print("An error occured")
