Você está na página 1de 2

# 1.

CICLO HAMILTONIANO

CAPITALES DE PAÍSES

 P=[capitales]

def capitales():
')

3.707700],[paris,48.861548, 2.348584],[berlin,52.508883, 13.409995],[b
ruselas,50.844550, 4.346892],[amsterdam,52.363733, 4.891052]]
cap2=[[londres,51.495831, -
0.116741],[copenhague,55.681120, 12.547447],[oslo,59.913768, 10.752224
],[varsovia,52.225137, 21.008221]]
cap3=[[viena,48.201382, 16.374557],[zagreb,45.807572, 15.981488],[
.918840, 32.857478]]
cap4=[[atenas,37.975933, 23.716364],[roma,41.892610, 12.496162],[r
abat,33.962877, -6.849995],[lisboa,38.720768, -9.139122]]
cap=cap1+cap2+cap3+cap4

R=6367650
LAM=sum([a[1] for a in cap])/len(cap)
LOM=sum([a[2] for a in cap])/len(cap)
PXY=[[a[0],(R*cos(a[1]*pi/180)*tan((a[2]-
LOM)*pi/180)).n()+I*(R*(a[1]-LAM)*pi/180).n()] for a in cap]
return PXY,[LOM,LAM]

 viaje(P)[1]

def viaje(P):
VP=[]
d=0
for i in range(len(P)):
VP.append(P[i]())
if i==0:
VPD=VP[0][0]
else:
d=d+desplazamiento(VP[i-1][1],VP[i][1])
VPD=VPD+[[a[0],a[1]+d] for a in VP[i][0]]
VPD=genera_mapa(VPD)
return VPD
2. SELECCIÓN TURBINA

def ns(n,Q,H):
#n en rpm, Q en l/s, H en m
a=sqrt(W)
b=H^1.25
c=n*a/b

if 5<=c<30:
print'Tipo recomendado: Pelton con un inyector'
elif 30<=c<50:
print'Tipo recomendado: Pelton con varios inyectores'
elif 50<=c<100:
elif 100<=c<200:

elif 200<=c<300:

elif 300<=c<500:
print'Tipo recomendado: Francis gemela rapida o express'
elif c>500:
else:
print'Los datos introducidos no son correctos.'

return c