Ayuda para hacer un archivo .py a exe
Publicado por Auri (2 intervenciones) el 06/08/2021 17:51:45
Buenos días, Pro favor me podrían ayudar a pasar un archivo python e ejecutable ya que no puedo hacerlo, seguimos las instrucciones de un video tutorial, pero creo que como somos nuevas en esto no le se .
Me pueden indicar cuales son las instrucciones para hacerlo ejecutable
Este es el código de mi programa
import matplotlib.pyplot as plt
#import math
def f(t,y):
return (-2*t**3)+(12*t**2)-(20*t)+8.5
def g(t,y):
return (-(t**4)/2)+(4*t**3)-(10*t**2)+((17*t)/2)+1
a=0
b=4
h=0.1
t=a
y=1
k=0
print ('{4}{0:^4}{4}{1:^8}{4}{2:^8}{4}{3:^8}{4}'.format('i','t','y','Sol.Exacta','|'))
while k<=b:
plt.scatter(t,y,color=(0.19,0.55,0.91))
plt.scatter(a,g(t,y),color='red')
print ('{4}{0:^4}{4}{1:>8.6f}{4}{2:>8.6f}{4}{3:>8.6f}{4:>3}'.format(k,t,y,g(t,y),'|'))
y = y + f(t,y) *h
t=t+h
a=a+h
k=k+1
plt.show()
Me pueden indicar cuales son las instrucciones para hacerlo ejecutable
Este es el código de mi programa
import matplotlib.pyplot as plt
#import math
def f(t,y):
return (-2*t**3)+(12*t**2)-(20*t)+8.5
def g(t,y):
return (-(t**4)/2)+(4*t**3)-(10*t**2)+((17*t)/2)+1
a=0
b=4
h=0.1
t=a
y=1
k=0
print ('{4}{0:^4}{4}{1:^8}{4}{2:^8}{4}{3:^8}{4}'.format('i','t','y','Sol.Exacta','|'))
while k<=b:
plt.scatter(t,y,color=(0.19,0.55,0.91))
plt.scatter(a,g(t,y),color='red')
print ('{4}{0:^4}{4}{1:>8.6f}{4}{2:>8.6f}{4}{3:>8.6f}{4:>3}'.format(k,t,y,g(t,y),'|'))
y = y + f(t,y) *h
t=t+h
a=a+h
k=k+1
plt.show()
Valora esta pregunta


0