Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Segundo Parcial Inf 111
Segundo Parcial Inf 111
C.I.:8464832
1.
def dentro(x1,y1,x2,y2,x,y):
if x <= x1 or x <= x2:
if y <= y1 or y <= y2:
sw = True
return sw
a,b,c,d=map(int,input().split())
x,y = map(int,input().split())
d = dentro(a,b,c,d,x,y)
if d == True:
print("Dentro")
else:
print("Fuera")
Prueba:
1153
22
Dentro
2.
def Cambia(a,b,c):
v =[a,b,c]
ve =v[1],v[2],v[0]
return ve
c1,c2,c3 = input().split()
ve = Cambia(c1,c2,c3)
print(*ve)
Prueba:
def desviacion(a,b,c,d,e,f,g,h,i,j):
v =[a,b,c,d,e,f,g,h,i,j]
m =len(v)
p = Promedio(a,b,c,d,e,f,g,h,i,j)
s = 0
for i in range(m):
s = s + math.pow((v[i]-p),2)
d = math.pow((s/9),0.5)
return d
a,b,c,d,e,f,g,h,i,j = map(float,input().split())
p = Promedio(a,b,c,d,e,f,g,h,i,j)
d =desviacion(a,b,c,d,e,f,g,h,i,j)
Prueba: