renze
发表于 2017-9-18 15:58:37
看看
aixuexi82
发表于 2017-9-27 16:24:38
X = [,
,
]
Y = [,
,
]
Z = X[:]
for i in range(3):
for j in range(3):
Z=X+Y
print(Z)
石小龙
发表于 2017-11-12 21:36:19
import numpy as n
x = [,
,
]
y = [,
,
]
a = n.array(x)
b = n.array(y)
c = a + b
print(c)
编程新血
发表于 2017-11-18 20:17:25
随便写的,看看答案。
x = [,,]
y = [,,]
xy=x[:]
for i in range(len(y)):
for i2 in range(len(y)):
xy+=y
print(xy)
achencan
发表于 2017-11-21 19:00:21
技术不够,用简单知识写的,写得很多---------------def splist(l,s):
return for i in range(len(l)) if i%s==0]
X = [,
,
]
Y = [,
,
]
list1 = []
list2 = []
list3 = []
for j in range(0,3):
for x in X:
list1.append(x)
for y in Y:
list2.append(y)
for i in range(0,9):
data = list1 + list2
list3.append(data)
list4 = splist(list3,3)
for k in range(3):
print list4
david_van
发表于 2017-12-2 19:42:25
#两个3行3列的矩阵,实现对应位置的数据相加,并返回新的矩阵
X = [,,]
Y = [,,]
result = []
for i in range(len(X)):
temp = []
for j in range(len(X)):
temp.append(X+Y)
result.append(temp)
print(result)
感觉对于一个X和Y一样的矩阵可行
shigure_takimi
发表于 2017-12-12 09:54:04
X = [,
,
]
Y = [,
,
]
def addXY(x, y):
Z = ,Y)) for i in range(len(X))]
for i in range(len(X)):
for j in range(len(X)):
Z = sum(Z)
return Z
print(addXY(X,Y))
##输出: [, , ]
yjsx86
发表于 2018-1-19 02:51:57
本帖最后由 yjsx86 于 2018-1-19 02:53 编辑
X = [,
,
]
Y = [,
,
]
rs = [,i)] for i in zip(X, Y)]
print(rs)
# result
[, , ]
壁垒来了
发表于 2018-1-27 20:12:41
x= [,
,
]
y= [,
,
]
a=[]
for j in range(3):
a.append(+yfor i in range(3)])
print(a)
1141429506
发表于 2018-1-28 16:02:41
from numpy import *
b = array([, , ])
a = array([, , ])
list1=[]
list2=[]
for i in range(3):
for j in range(3):
m=b+a
list1.append(m)
list2.append(list1)
list1=[]
print(array(list2))
请求回答
发表于 2018-1-29 20:03:58
看看
会飞的狼666
发表于 2018-1-30 00:21:28
看一波
TheKernel
发表于 2018-2-1 22:25:51
哈哈哈
回不去的鱼
发表于 2018-2-1 22:45:25
学习!!
z1446773686
发表于 2018-2-18 16:09:11
x = [,
,
]
y = [,
,
]
list1 = []
if len(x) == len(y):
for i in range(len(x)):
list1.append([])
for j in range(len(x)):
list1.append(x + y)
print(list1)
{:10_269:}
借鉴一位鱼油的
ultraji
发表于 2018-2-20 09:33:59
X = [,
,
]
Y = [,
,
]
for i in range(3):
for j in range(3):
X += Y
print(X)
sunflower-柠檬
发表于 2018-2-20 14:13:54
两个想加后不知道怎么打印出来
不失微笑
发表于 2018-2-20 22:35:52
h
victor.xu
发表于 2018-2-23 11:31:12
谢谢
lchelement
发表于 2018-2-26 12:22:37
X = [,
,
]
Y = [,
,
]
Z = [,
,
]
for i in range(3):
for j in range(3):
Z=X+Y
print(Z)