Towns and villages

Solved
tao -  
 tao -
Hello,

this program:
 NbLieu = int(input()) ville = 0 for loop in range (NbLieu): pop = int(input()) if pop > 10000: ville = ville + 1 else : ville = ville + 0 print(ville) 

gives me an error message:


File "exe", line 5
if pop > 10000:
^
SyntaxError: invalid syntax


and I don't understand why ...
Could you help me ???
Thanks !!

EDIT: Added code tags

2 answers

  1. jordane45 Posted messages 30427 Registration date   Status Moderator Last intervention   4 832
     
    Hello,

    Have you thought about indentation?
     if condition : indented_instruction 


    --
    Best regards,
    Jordane
    2
    1. tao
       
      I tried yes, it always gives me the same message....
      0
    2. tao
       
      When the indentation is not correct, it indicates:
      "Sorry: IndentationError: expected an indented block (exe, line 4)"
      0