GatoBooster

Cuestionario 3 Ayudantía Módulo 1 - Mar 31/Agosto - selección

Aug 30th, 2021
1,775
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.82 KB | None | 0 0
  1. # ENTRADA
  2. precio = int(input())
  3. cantidad = int(input())
  4.  
  5. # PROCESO
  6. # en pricipio el precio final será
  7. # el cálculo de cantidad * precio
  8. # en caso de que la cantidad sea igual o mayor a 10
  9. # tiene un descuento del 10%
  10. # para ello el valor final se multiplica por 0.9
  11.  
  12.  
  13. precioFinal = cantidad * precio
  14.  
  15. if cantidad >= 10 :
  16.    precioFinal = precioFinal  *0.9
  17.  
  18. # SALIDA
  19. print("Precio final :",round(precioFinal))
  20.  
  21. ---------------------------------------------------------------------------------------------------------------------
  22. # ENTRADA
  23. numero = int(input())
  24.  
  25. # PROCESO
  26. ultimoDigito = numero % 10
  27.  
  28. # SALIDA
  29. if (ultimoDigito == 3) or (ultimoDigito == 7)  :
  30.     print("SI")
  31. else :
  32.     print("NO")
  33. ---------------------------------------------------------------------------------------------------------------------
  34. # ENTRADA
  35. edad = int(input())
  36. cantCajas = int(input())
  37. valorCajaSinIva = float(input())
  38.  
  39. # PROCESO
  40. precioTotalCajasSinIva = cantCajas * valorCajaSinIva
  41. precioTotalCajasConIva = precioTotalCajasSinIva * 1.19
  42. if (edad >= 60) and (cantCajas >= 10) :
  43.     descuento = precioTotalCajasConIva * 0.6
  44. else :
  45.     descuento = precioTotalCajasConIva * 0.07
  46. precioFinalConDescuento = precioTotalCajasConIva - descuento
  47.        
  48. # SALIDA
  49. print("Valor Compra con IVA       = $",round(precioTotalCajasConIva,1))
  50. print("Total Descuento            = $",round(descuento,1))
  51. print("Valor Compra con Descuento = $",round(precioFinalConDescuento,1))
  52. ---------------------------------------------------------------------------------------------------------------------
  53. # ENTRADA
  54. salario = int(input())
  55.  
  56. # PROCESO
  57.  
  58. if salario < 250000 :
  59.     aumento = 20
  60. elif salario < 500000 :
  61.     aumento = 10
  62. elif salario < 1000000 :
  63.     aumento = 5
  64. else :
  65.     aumento = 0
  66. nuevoSalario = salario*(1+aumento/100)
  67.  
  68. # SALIDA
  69. print("Salario reajustado = $"+str(round(nuevoSalario)))
  70. ---------------------------------------------------------------------------------------------------------------------
  71. # ENTRADA
  72. trabajo1 = float(input())
  73. trabajo2 = float(input())
  74. trabajo3 = float(input())
  75. presentacion1 = float(input())
  76. presentacion2 = float(input())
  77. proyecto = float(input())
  78. prueba = float(input())
  79.  
  80. # PROCESO
  81. promTrabajos = (trabajo1 + trabajo2 + trabajo3) / 3
  82. promPresentaciones = (presentacion1 + presentacion2) / 2
  83. promProyPrueba = (proyecto + prueba) / 2
  84. if promProyPrueba >= 4 :
  85.     nota = prueba*0.4 + proyecto*0.4 + promTrabajos*0.1 + promPresentaciones*0.1
  86. else :
  87.     nota = prueba*0.4 + proyecto*0.4 + promPresentaciones*0.2
  88.  
  89. # SALIDA
  90. print("Nota presentacion =",round(nota,1))
  91. if nota >= 5 :
  92.     print("Aprobado")
  93. elif nota >= 3 :
  94.     print("Debe rendir examen")
  95. else :
  96.     print("Reprobado")
  97. if nota > 6 :
  98.     print("Vuelo de observacion!")
  99. ---------------------------------------------------------------------------------------------------------------------
  100. # ENTRADA
  101. tiempo = int(input())
  102. categoria = int(input())
  103.  
  104. # PROCESO
  105. """
  106. 1) valor se inicializa en 800
  107. 2) se analiza la categoría del vehículo
  108.    para agegar los costos que correspondan
  109.    nota: si fuera categorias 1, 2 o 3 y tiempo menor o igual a 30 minutos
  110.    asigna inicialmente 800 a valor
  111.    y luego no cumple ninguna condición "especial"
  112. """
  113. valor = 800
  114. if (categoria==1) and (tiempo > 30) :
  115.     valor = valor + (tiempo-30)*20  
  116. elif (categoria==2) and (tiempo > 30) :
  117.     valor = valor + (tiempo-30)*25
  118. elif (categoria==3) and (tiempo > 30 ) :
  119.     valor = valor + (tiempo-30)*30
  120.     valor = valor + ((tiempo-30) // 30)*15
  121. elif categoria==4 :
  122.     valor = valor + 200
  123.     if tiempo > 30 :
  124.         valor = valor + (tiempo-30)*35
  125.         valor = valor + ((tiempo-30) // 25)*15
  126.  
  127. # SALIDA    
  128. print(valor)
  129. ---------------------------------------------------------------------------------------------------------------------
  130.  
Advertisement
Add Comment
Please, Sign In to add comment