2017-10-24 1 views
-5

# Es zeigt Syntaxfehler, während ich diesen Python-Code ausführen, kann mir jemand sagen, was der Grund sein könnte.Was ist falsch in der folgenden Python-Code, wo es zeigt Syntax Fehler Hervorhebung "Bürger" Variable

age = int(input("Enter Your Age") 
citizen = input("Belongs to India ?, true or false") 

if age >= 18 and citizen == "true": 
      print("You Belongs To India and Eligible For Voting") 
elif age >= 18 and citizen == "false": 
      print("Though You were 18 and Plus but not Indian") 
elif age < 18 and citizen == "true": 
      print(" Though You were Indian you don't have 18 and Plus") 
elif age < 18 and citizen == "false": 
      print("You are not Indian and you don't have 18 and Plus") 
else: 
      print("All th credintials were entered doesn't match the criteria") 
+1

schließen Sie die Klammern –

+1

Die erste Zeile a) '' fehlt – Shadow

Antwort

0
age = int(input("Enter Your Age")**)** 
citizen = input("Belongs to India ?, true or false") 

if age >= 18 and citizen == "true": 
      print("You Belongs To India and Eligible For Voting") 
elif age >= 18 and citizen == "false": 
      print("Though You were 18 and Plus but not Indian") 
elif age < 18 and citizen == "true": 
      print(" Though You were Indian you don't have 18 and Plus") 
elif age < 18 and citizen == "false": 
      print("You are not Indian and you don't have 18 and Plus") 
else: 
      print("All th credintials were entered doesn't match the criteria") 
Verwandte Themen