sxzpf 发表于 2018-9-11 15:35:45

666666

sxzpf 发表于 2018-9-11 22:16:34

a = []
b = []
c = []
for i in range(3):
    d = []
    e = []
    f = []
    for j in range(3):
      d.append(int(input('请输入第一个列表的第%d行,%d列的值:'%(i+1,j+1))))
      e.append(int(input('请输入第二个列表的第%d行,%d列的值:'%(i+1,j+1))))
      f.append(d+e)
    a.append(d)
    b.append(e)
    c.append(f)
for i in range(3):
    print(c)

lyslyslys 发表于 2018-9-12 09:51:03

学习学习

apple_wt 发表于 2018-9-14 15:13:15

z = []
x = [,,]
y = [,,]
for i in range(3):
    a = []
    for j in range(3):
      num = x + y
      a.append(num)
    z.append(a)
print(z)

wangl81815 发表于 2018-10-13 22:03:51

学习

吃鱼的虾 发表于 2018-10-14 19:29:21

已做

archlzy 发表于 2018-10-16 12:31:49

[,Y)] for m in range(3)]

绊axs 发表于 2018-10-16 12:56:41

>>> import tensorflow as tf
>>> X = tf.Variable([,
    ,
    ])
>>> Y = tf.Variable([,
    ,
    ])
>>> Z = tf.add(X,Y)
>>> with tf.Session() as sess:
        sess.run(tf.global_variables_initializer())
        print(sess.run(Z))

       
[

]

{:10_266:}

zhangjk19841984 发表于 2018-10-20 20:04:59

import numpy as np
x =np.mat( [,#mat代表二维矩阵
    ,
    ])

y = np.mat([,
    ,
    ])
l=x+y
print(l,end=' -------\n')

兔兔小默 发表于 2018-10-20 22:38:03

111

Roc乘风 发表于 2018-10-25 16:03:01

打卡
我的答案,不是很满意,
X = [,,]

Y = [,,]

Z =[[],[],[]]

for x in range(0,3):
    for y in range(0,3):
      Z.append(X+Y)
print(Z)

比较中意,这个
X = [,,]

Y = [,,]
for i in range(len(X)):
      for j in range(len(X)):
                Z = X + Y

print(Z)

double-lee 发表于 2018-12-4 11:04:14

x = [,,]
y = [,,]
z = [,,]
for i in range(3):
    for j in range(3):
      z = x + y

咕咕鸡鸽鸽 发表于 2019-1-3 15:05:51

kk

xxt 发表于 2019-1-18 13:37:09

z1=[]
z=[]
x= [ , ,]
y= [ , ,]
for i in range(3):
    for j in range(3):
      temp=x+y
      z1.append(temp)
    z.append(z1)
    z1=[]
print(z)

北城以北灬 发表于 2019-2-26 17:13:24

X = [,
   ,
   ]

Y = [,
   ,
   ]


def ex11(x, y):
    z = x
    for i in range(len(x)):
      for j in range(len(y)):
            z = x + y
    print(z)


ex11(X, Y)

hjx123hjx 发表于 2019-3-2 16:47:04

学习一下

Mrboomboom 发表于 2019-3-4 15:59:17

print([+Y for j in range(len(X))] for i in range(len(X))])

捞鬼 发表于 2019-3-11 20:31:33

坚持

lwy520 发表于 2019-3-15 12:33:33

X = [,
    ,
    ]

Y = [,
    ,
    ]

x = [,
    ,
    ]

y = [,
   ,
   ]

for i in range(3):
    for j in range(3):
      x=X
      y=Y

print(x)
print(y)

lwy520 发表于 2019-3-15 12:34:31

X = [,
    ,
    ]

Y = [,
    ,
    ]

x = [,
    ,
    ]


for i in range(3):
    for j in range(3):
      x=X+Y

print(x)
页: 1 2 3 4 [5] 6 7 8
查看完整版本: Python:每日一题 11