-3
 from tkinter import*
screen = Tk()

class troubleshooter:
def __init__(self):
     screen = ['cracked', 'glass', 'touchscreen', 'lcd','blank']
     overheating = ['hot', 'overheating', 'warm']
     wet = ['water', 'damp', 'soaking','wet']
     nowork = ['not working', 'broken']
     dict1 = {'broken screen' : screen, 'phone overheating' : overheating, 'wet phone' : wet, 'phone not working' : nowork}
     self.dict2 = {'broken screen' : 1, 'phone overheating' : 2, 'wet phone' : 3, 'phone not working' : 4}
     problem = input("What is the problem?")
    for i in d:
         for n in d[i]:
             if n in problem:
                print('I saw', n, 'in your response.')
                 confirm = input('is ' + i + ' your problem, yes or no?')
                if "y" in confirm:
                     solution(n)


def solution(self, issue):
    q = self.dict2[issue]
    if q == 1:
    elif q == 2:
    elif q == 3:
    else:
def 

troubleshooter()

I keep get a erro message saying this unindent does not match any outer indentation level on the line where it says "for i in d:"

  • 1
    You understand that the line with "problem = ... " and the line for "for ..." should have the exact same indentation? And even in your example one can see that this is not the case. – GhostCat Oct 20 '16 at 15:43

1 Answers1

0

The problem is at indentation. Put one more whitespace before for i in d:

Eugen Konkov
  • 22,193
  • 17
  • 108
  • 158