Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Variables to create Arrays

Status
Not open for further replies.

PipedreamerGrey

Programmer
Jan 6, 2005
2
US
I'm creating a utility to calculate certain mathimatical factors in a series of pipes. The utility asks ten questions. Six questions are asked once to determine six "constants" and four questions are asked for each seperate pipe in the assembly to determine four variables. I need to find a way to create the same number of arrays as pipes in order to store the four inputs for each pipe and in order to determine how many times to ask for the last four variables; however you can't create an array in Python with an expression. Does anyone have any alternate solutions?

 
What do you mean, "you can't create an array in Python with an expression"?

Seems to me like you would collect the number of pipes in the first 6 questions, then iterate over the appropriate number of arrays and array members to create the other storage items.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top