2021年10月31日
摘要: 1 # 创建字典 2 import keras 3 out_put= {x: x**2 for x in (2,4,6)} 4 # print(out_put,type(out_put)) #{2: 4, 4: 16, 6: 36} <class 'dict'> 1 import numpy as 阅读全文
posted @ 2021-10-31 19:16 GooBo 阅读(139) 评论(0) 推荐(0)
摘要: 1. 如果我们列出所有小于10的自然数中,3或5的倍数,我们可以得到3 5 6 9。这几个数的和为23。 #给一个数,返回所有小于它的自然数,3和5的倍数之和。如果其中有负数,则返回0。 # 样例:solution(4), 3 ,solution(6), 8。 1 def solution(numb 阅读全文
posted @ 2021-10-31 14:22 GooBo 阅读(110) 评论(0) 推荐(0)