Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Print
#1
Hello, I'm trying to find a way to excute the command print below to get the same load the prediction. But it doesn't load it, it just print the print.
n=2005;
while(n!=2008) :
    prog='print("predictions_",n,","," parameters_",n," ","= get_predictions_each_year",(n,12), sep="")';
    exec(prog)
    n=n+1;
Output:
predictions_2005, parameters_2005 = get_predictions_each_year(2005, 12) predictions_2006, parameters_2006 = get_predictions_each_year(2006, 12) predictions_2007, parameters_2007 = get_predictions_each_year(2007, 12)
# Get Predictions alongside information on SARIMA paramters used for 2005
predictions_2005, parameters_2005 = get_predictions_each_year(2005,12)
Output:
100% 14/14 [00:06<00:00, 2.10it/s]
Could you help me with this ?
Thank you
Reply


Messages In This Thread
Print - by kdiba - Oct-11-2019, 11:12 AM
RE: Print - by buran - Oct-11-2019, 11:17 AM
RE: Print - by kdiba - Oct-11-2019, 11:28 AM
RE: Print - by buran - Oct-11-2019, 12:04 PM
RE: Print - by kdiba - Oct-11-2019, 12:17 PM
RE: Print - by buran - Oct-11-2019, 12:26 PM
RE: Print - by kdiba - Oct-11-2019, 12:28 PM
RE: Print - by buran - Oct-11-2019, 12:29 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020