data = 80 età = input('per iniziare dimmi quanti anni hai:') data = data - età fumo = eval(input('fumi? (si/no)')  if fumo == 'si':     data = data - 10  else:     pass print('ti restano da vivere ' data 'anni') i can't error is, every time run syntax error on colon @ end of "if" line i've red every post on if else elif statements in python still can't why.
fumo = eval(input('fumi? (si/no)') right there. you're missing parenthesis @ end of line. open parenthesis makes python think if statement part of statement.
Comments
Post a Comment