Blanca y Corchea


/ Published in: Python
Save to your folder(s)



Copy this code and paste it in your HTML
  1. # Operadores matematicos
  2. print "25 == 46 es", 25 == 46
  3. print "24 == 14 es ", 24 == 14
  4. print "24 < 36 es ", 24 < 36
  5. print "12 > 67 = ", 12 > 67
  6. print "\n" #Retorno de Carro
  7.  
  8. # Usando parentesis
  9. print "(24 < 36) == (50 < 51) es ", (24 < 36) == (50 < 51)
  10. print "\n"
  11.  
  12. # Uso de parentesis operadores matematicos
  13. print "Sin parentesis 2 + 2 * 5 es igual a ", 2 + 2 * 5
  14. print "Con parentesis (2 + 2) * 5 es igual a ", (2 + 2) * 5
  15. print "\n"

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.