I'm attempting to set up a system where if the user has seen a 'file' as such they can return to the menu. Why isn't this user defined function making the code loop back to the menu?
My code:
print('Please input username, if you have not got an assigned username, please contact ')
Username=input()
if Username =='Frobinson':
    print('Please input password, the default password will be QWERTY')
    Password=input()
    if Password == 'QWERTY':
        def menu():
        print('-----------------------------')
        print('Options:')
        print('A: See files')
        optionselect=input()
        if optionselect =='A':
            print('Enter a name to see details')
            name=input()
            if name== 'Archie_Rayner':
                print()
                print()
                print('Profile for Archie Rayner')
                print('-----------------------------')
                print('Name: Archie Rayner')
                print('Year: 11')
                Back=Input()
                if Back='Back':
                    menu()
I'm fairly new to coding so don't really know where to start.
This is the error message I'm confronted with:
Traceback (most recent call last):
  File "/Volumes/Thonny 3.1.2/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ast.py", line 35, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "/Users/feerobinson/Database.py", line 9
    while True:
        ^
IndentationError: expected an indented block
 
     
    