Advertisement
Guest User

Untitled

a guest
Jun 19th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.04 KB | None | 0 0
  1. import time
  2.  
  3.  
  4.  
  5. print("Bem vindo a calculadora de medias.")
  6. time.sleep(0.5)
  7. testes = int(raw_input("Insere o numero de testes:"))
  8. if testes < 2:
  9. print("o minimo de testes e 1")
  10. time.sleep(1.8)
  11.  
  12.  
  13. if testes == 2:
  14. x = float(raw_input("Insere a nota do teu primeiro teste:"))
  15. y = float(raw_input("Insere a nota do teu segundo teste:"))
  16.  
  17. resultado = (x + y)/2
  18. print (resultado)
  19. time.sleep(1.2)
  20.  
  21.  
  22. if resultado < 50:
  23. seranegativa = raw_input("Achas que te portaste bem:")
  24. s = "sim"
  25. if seranegativa == s:
  26. oitenta = resultado * 0.80
  27. comportamento = int(raw_input("De 0 a 20 quanto mereces no comportamento:"))
  28. total = oitenta + comportamento
  29. if total > 49.9:
  30. print("tens sorte! podes ainda tirar positiva")
  31. print(total)
  32. time.sleep(1.2)
  33.  
  34. else:
  35. print ("eh eh vais tirar negativa")
  36. print (total)
  37. time.sleep(1.2)
  38.  
  39. if seranegativa != s:
  40. print("Se te comportasses direito... podias nao tirar nega")
  41. time.sleep(1.2)
  42.  
  43. if testes == 3:
  44. x = float(raw_input("Insere a nota do teu primeiro teste:"))
  45. y = float(raw_input("Insere a nota do teu segundo teste:"))
  46. z = float(raw_input("Insere a nota do teu terceiro teste:"))
  47.  
  48. resultado = (x + y + z)/3
  49.  
  50. print(resultado)
  51. time.sleep(1.2)
  52.  
  53.  
  54. if resultado < 50:
  55. seranegativa = raw_input("Achas que te portaste bem:")
  56. s = "sim"
  57. if seranegativa == s:
  58. oitenta = resultado * 0.80
  59. comportamento = int(raw_input("De 0 a 20 quanto mereces no comportamento:"))
  60. total = oitenta + comportamento
  61. if total > 49.9:
  62. print("tens sorte! podes ainda tirar positiva")
  63. print(total)
  64. time.sleep(1.2)
  65.  
  66. else:
  67. print ("eh eh vais tirar negativa")
  68. print (total)
  69. time.sleep(1.2)
  70.  
  71. if seranegativa != s:
  72. print("Se te comportasses direito... podias nao tirar nega")
  73. time.sleep(1.2)
  74.  
  75. if testes > 3:
  76. print("O maximo de testes e 3")
  77. time.sleep(1.8)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement