Robertogram

Implicação Python

May 18th, 2022 (edited)
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.84 KB | None | 0 0
  1. from decimal import Decimal
  2. inf = Decimal('Infinity')
  3. #{ x∈N : x<10 → x<3 }
  4. #inf = float('inf')
  5. #Tabela Verdade SE...ENTÃO / SI...TUNC / IF...THEN
  6. #Entrada1   Entrada2    Saída
  7. #VERDADEIRO VERDADEIRO  VERDADEIRO
  8. #VERDADEIRO FALSO   FALSO
  9. #FALSO  VERDADEIRO  VERDADEIRO
  10. #FALSO  FALSO   VERDADEIRO
  11.  
  12. if inf < 10:
  13.     print('true')
  14.     print()
  15. else:
  16.     print('false', 'ifinito')
  17.     print()
  18.  
  19.  
  20. i = 0
  21. for x in range(0, 100):
  22.     v1 = None
  23.     v2 = None
  24.     if x < 10:
  25.         if x < 3:
  26.             print("Verdadeiro -> Verdadeiro = Verdadeiro")
  27.             i += 1
  28.         else:
  29.             print("Verdadeiro -> Falso = Falso")
  30.     else:
  31.         if x < 3:
  32.             print("Falso -> Verdadeiro = Verdadeiro")
  33.             i += 1
  34.         else:
  35.             print("Falso -> Falso = Verdadeiro")
  36.             i += 1
  37. print(i)
  38.  
  39.    
  40.        
Add Comment
Please, Sign In to add comment