Advertisement
teslariu

turing

Jul 1st, 2022
911
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.20 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. #
  4. """
  5. Alan Turing --> funciones computables: una operacion matematica que
  6. puede ser resuelta por una màquina -> computadora
  7. Lenguaje de programacion Turing completo: aquel que puede programar cualquier
  8. función computable
  9. Teorema: para ser Turing completo, un lenguaje debe tener mìnimamente 3
  10. estructuras logicas:
  11. 1 condicional:    if
  12. 1 bucle definido   for
  13. 1 bucle indefinido   while
  14.  
  15.  
  16. # condicional:
  17. # Script que pide una edad y responde si es mayor
  18. edad = int(input("Ingrese su edad: "))
  19.  
  20. if edad >= 18:
  21.    print("Usted ya es mayor de edad")
  22.    print("Felicidades")
  23. else:
  24.    print("No es mayor de edad aun...")
  25.    print("Lastima...")
  26.    print("Adios...")
  27.    
  28. """
  29. # Script que pide un nota y devuelve el estado de aprobación
  30. # 0 a 3 insuficiente
  31. # 4: regular
  32. # 5 y 6 bien
  33. # 7 8 9 muy bien
  34. # 10 sobresaliente
  35.  
  36. nota = int(input("Ingrese su nota (entre 0 y 10): "))
  37.  
  38. if 0<= nota < 4:
  39.     print("Insuficiente")
  40. elif nota == 4:
  41.     print("Regular")
  42. elif 5<= nota <=6:
  43.     print("Bien")
  44. elif 7<= nota <=9:
  45.     print("Muy bien")
  46. elif nota == 10:
  47.     print("Sobresaliente")
  48. else:
  49.     print("Error. La nota debe estar entre 0 y 10")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement