Hi all,
I want to associate a list of 4 members with another list with the same number of members, but each member of the second list has three sub-members. How can I define that in my code?
Here is my code. Please let me know how I can change this:
I want to associate a list of 4 members with another list with the same number of members, but each member of the second list has three sub-members. How can I define that in my code?
Output:model=[model1,model2,model3 ,model4]
mat_prop=[mp1,mp2,mp3,mp4]
mp1=[name1, E1, Nu1, Dens1]
mp2=[name2, E2, Nu2, Dens2]
.Here is my code. Please let me know how I can change this:
model=[] for i in range(4): m='model {}'.formate(i+1) model.append(m) E=[E1,E2,E3,E4] Nu=[Nu1, Nu2, Nu3, Nu4] Den=[d1,d2,d3,d4] name=[st,Al,Ni, ci] mat_prop=[] for i in range (4): mat_name=(name[i]) mat_Elas=(E[i], Nu[i]) mat_dens=(Den[i]) mat_prop.append()
Larz60+ write Mar-10-2023, 04:42 PM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Fixed for you this time, please use BBCode on future posts.
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Fixed for you this time, please use BBCode on future posts.
Attached Files
q1.py (Size: 958 bytes / Downloads: 86)