
important: Set[str] = {"Albert Einstein" , "Alan Turing"}
texts: Dict[str, str] = input() # {"<author >" : "<t e x t >"}

freqdict: Dict[str, int] = {}     # defaultdict(int)  err: int recognized as varId  #initialized to 0
a: str = ""     #necessary?
b: str = ""
for a, b in texts.items():
    if a in important:     #texts of important authors weighted twice
        weight: int = 2
    else:
        weight: int = 1
        words: List[str] = a.split()      #Bug A: Should be `b' (values)
        for word in words:     #and Bug B: Wrong indentation
            word: str = word.lower()
            freqdict[word]: int = freqdict[word] + weight
print(freqdict)         #outputs <word>:<count>, ...

important: Set[str] = {"Albert Einstein" , "Alan Turing"}
texts: Dict[str, str] = input() # {"<author >" : "<t e x t >"}

freqdict: Dict[str, int] = {}     # defaultdict(int)  err: int recognized as varId  #initialized to 0
a: str = ""    #necessary?
b: str = ""
for a, b in texts.items():
    if a in important:     #texts of important authors weighted twice
        weight: int = 2
    else:
        weight: int = 1
        words: List[str] = a.split()      #Bug A: Should be `b' (values)
        word: str = ""
        for word in words:     #and Bug B: Wrong indentation
            word: str = word.lower()
            freqdict[word]: int = freqdict[word] + weight
print(freqdict)         #outputs <word>:<count>, ...
Fix to typing of loop variables
Fix to typing of loop variables

  
  important: Set[str] = {"Albert Einstein" , "Alan Turing"}
  texts: Dict[str, str] = input() # {"<author >" : "<t e x t >"}
  
  freqdict: Dict[str, int] = {}     # defaultdict(int)  err: int recognized as varId  #initialized to 0
- a: str = ""     #necessary?
+ a: str = ""    #necessary?
  b: str = ""
  for a, b in texts.items():
      if a in important:     #texts of important authors weighted twice
          weight: int = 2
      else:
          weight: int = 1
          words: List[str] = a.split()      #Bug A: Should be `b' (values)
+         word: str = ""
          for word in words:     #and Bug B: Wrong indentation
              word: str = word.lower()
              freqdict[word]: int = freqdict[word] + weight
  print(freqdict)         #outputs <word>:<count>, ...
Fix to typing of loop variables
## Code Before:

important: Set[str] = {"Albert Einstein" , "Alan Turing"}
texts: Dict[str, str] = input() # {"<author >" : "<t e x t >"}

freqdict: Dict[str, int] = {}     # defaultdict(int)  err: int recognized as varId  #initialized to 0
a: str = ""     #necessary?
b: str = ""
for a, b in texts.items():
    if a in important:     #texts of important authors weighted twice
        weight: int = 2
    else:
        weight: int = 1
        words: List[str] = a.split()      #Bug A: Should be `b' (values)
        for word in words:     #and Bug B: Wrong indentation
            word: str = word.lower()
            freqdict[word]: int = freqdict[word] + weight
print(freqdict)         #outputs <word>:<count>, ...
## Instruction:
Fix to typing of loop variables
## Code After:

important: Set[str] = {"Albert Einstein" , "Alan Turing"}
texts: Dict[str, str] = input() # {"<author >" : "<t e x t >"}

freqdict: Dict[str, int] = {}     # defaultdict(int)  err: int recognized as varId  #initialized to 0
a: str = ""    #necessary?
b: str = ""
for a, b in texts.items():
    if a in important:     #texts of important authors weighted twice
        weight: int = 2
    else:
        weight: int = 1
        words: List[str] = a.split()      #Bug A: Should be `b' (values)
        word: str = ""
        for word in words:     #and Bug B: Wrong indentation
            word: str = word.lower()
            freqdict[word]: int = freqdict[word] + weight
print(freqdict)         #outputs <word>:<count>, ...