You are on page 1of 2

new 1

sbado, 16 de abril de 2016 09:14 p.m.

# Ejercicio 5
import math
print ("HALLANDO LA HIPOTENUSA DE UN TRIANGULO RECTANGULO")
cateto1=float(input("Ingrese el cateto mayor: "))
cateto2=float(input("Ingrese el cateto menor: "))
hipotenusa=math.sqrt(pow(cateto1,2)+pow(cateto2,2))
print ("La hipotenusa es: ",hipotenusa)

# Ejercicio 7
print ("HALLANDO EL SALARIO NETO DE UN TRABAJADOR")
horas=int(input("Ingrese el numero de horas trabajadas: "))
precio=float(input("Ingrese el precio por hora: "))
sal_bruto=horas*precio
resto=(sal_bruto*25)/100
sal_neto=sal_bruto-resto
print("Su salario neto es: ",sal_neto,"soles")
# Ejercicio 9
print ("PORCENTAJE DE HOMBRES Y MUJERES")
varon=int(input("Ingrese el numero de varones: "))
mujer=int(input("Ingrese el numero de mujeres: "))
suma=varon+mujer
porcentaje_varon=(varon*100)/suma
porcentaje_mujer=(mujer*100)/suma
print ("El porcentaje de varones es: ",porcentaje_varon,"%")
print ("El porcentaje de mujeres es: ",porcentaje_mujer,"%")
# Ejercicio 14
print ("TIEMPO PROMEDIO EN RECORRER UNA RUTA")
print ("--------Lunes--------")
hora1=int(input("horas: "))
minuto1=int(input("Minutos: "))
segundo1=int(input("Segundos: "))
print ("--------Miercoles--------")
hora2=int(input("horas: "))
minuto2=int(input("Minutos: "))
segundo2=int(input("Segundos: "))
print ("--------Viernes--------")
hora3=int(input("horas: "))
minuto3=int(input("Minutos: "))
segundo3=int(input("Segundos: "))
promed_hora=int((hora1+hora2+hora3)/3)
promed_minuto=int((minuto1+minuto2+minuto3)/3)
promed_segundo=int((segundo1+segundo2+segundo3)/3)
print ("El tiempo promedio es: ",promed_hora,"hrs con",promed_minuto,"minutos
y",promed_segundo,"segundos")

# Ejercicio 15
print ("PORCENTAJE DE DINERO INVERTIDO")
person1=float(input("inversor 1: "))
person2=float(input("inversor 2: "))
person3=float(input("inversor 2: "))
total=person1+person2+person3
porcent1=(person1*100)/total
porcent2=(person2*100)/total
porcent3=(person3*100)/total
print ("El porcentaje del primer inversor es: ",porcent1,"%")
print ("El porcentale del segundo inversor es: ",porcent2,"%")
print ("El porcentaje del tercer inversor es: ",porcent3,"%")

-1-

You might also like