mercredi 31 octobre 2018

This code snippet causes variables to give me a syntax error afterward

My code starts with:

pcperception = input("What is your character's current perception?")
if pcperception == ("1"):
  prange = (1)
elif pcperception == ("2"):
else:
  prange = (1)
print ("your range is " + str(prange)`

and if I add a variable via input afterward

tommy = input("What is your name?")

It tells me that my syntax is incorrect in declaring the variable. But if i get rid of the top code, the bottom works.

Aucun commentaire:

Enregistrer un commentaire