fork download
  1. def filtro(p):
  2. if p > 6:
  3. return True
  4. return False
  5.  
  6. x = int(input("Valor de x"))
  7. if filtro(x): print(x)
  8. x = int(input("Valor de x"))
  9. if filtro(x): x = x * 2
  10. print(x)
  11. x = int(input("Valor de x"))
  12. if filtro(x): x = x * 2
  13. print(x)
  14.  
  15. #https://pt.stackoverflow.com/q/274003/101
Success #stdin #stdout 0.02s 9240KB
stdin
1
7
9
stdout
Valor de xValor de x14
Valor de x18