2019年8月13日

flag的变形应用

摘要: 上学期assignment的时候第一次接触flag,当时的题目要求是从第一个引号处开始寻找,然后分情况讨论碰到哪几种特殊情况继续搜索,哪几种特殊情况时停止搜索。 flag适用条件:起点一定,且接下来的一系列循环操作中,如果对flag值改变则改变是永久性的,否则进行其他相关操作 示例:定义一个函数f( 阅读全文

posted @ 2019-08-13 13:42 Eleni 阅读(173) 评论(0) 推荐(0) 编辑

2019年8月8日

pre_exam 4

摘要: 这道题需要将给出的text里面的单词根据单词长短分类,并按字母顺序排列 阅读全文

posted @ 2019-08-08 17:09 Eleni 阅读(185) 评论(0) 推荐(0) 编辑

2019年8月7日

fuzzy logic

摘要: 1. Fuzzy logic: a computational approach centered on the idea of ‘degrees of truth’ rather than the black/white true or false approach of most systems 阅读全文

posted @ 2019-08-07 18:46 Eleni 阅读(384) 评论(0) 推荐(0) 编辑

pre_exam exercise 3

摘要: >>> single_factors(2) 2 >>> single_factors(4096) # 4096 == 2**12 2 >>> single_factors(85) # 85 == 5 * 17 85 >>> single_factors(10440125) # 10440125 == 阅读全文

posted @ 2019-08-07 11:55 Eleni 阅读(138) 评论(0) 推荐(0) 编辑

2019年8月1日

一次关于递归作业的总结(code)

摘要: from random import seed, randrange import sys dim = 10 def display_grid(): for row in grid: print(' ', *row) def display_grid1(): for row in grid1: print(' ', *row) #gr... 阅读全文

posted @ 2019-08-01 08:58 Eleni 阅读(307) 评论(3) 推荐(0) 编辑

2019年7月26日

pre-exam_exercise2

摘要: Returns a new list consisting of: * in case "from_first" is True: L’s first member if it exists, then L’s last member if it exists, then L’s second me 阅读全文

posted @ 2019-07-26 16:55 Eleni 阅读(234) 评论(1) 推荐(0) 编辑

2019年7月25日

pre_exam_exercise1

摘要: 题目: Returns an integer consisting of all nonzero digits in "number", from smallest to largest.You can assume that "number" is a valid strictly positiv 阅读全文

posted @ 2019-07-25 18:44 Eleni 阅读(159) 评论(0) 推荐(0) 编辑

2019年7月21日

全为1时计算个数,出现0返回0

摘要: #reply=input('How can I help you? ') def size_1(m_grid): #计算总共1的个数 count=0 for row in grid: for i in row: if i==1: count+=1 else: count=0 break if cou 阅读全文

posted @ 2019-07-21 15:38 Eleni 阅读(150) 评论(1) 推荐(0) 编辑

2019年7月19日

COMP9021--7.18

摘要: 从今天开始引入递归的概念 1. 为了避免递归过程中陷入死循环,一定要在最开始的时候就写好递归结束的条件 2. 递归的本质是通过解决smaller input,并用其结果得到下一步的output,类推直至约定的递归终止点 3. yield的作用是把一个函数变成一个generator,它与函数的不同之处 阅读全文

posted @ 2019-07-19 15:25 Eleni 阅读(192) 评论(2) 推荐(0) 编辑

2019年7月18日

lecture 5 Basics of Map Algebra

摘要: 1. Integrated analysis of spatial and attribute data a) Retrieval/Classification/ Measurement 检索/分类/测量 ratrieval: 应用于多段线和多边形,确定覆盖该特征的最小矩形,其边与空间参照系的轴平行 阅读全文

posted @ 2019-07-18 17:57 Eleni 阅读(179) 评论(1) 推荐(0) 编辑

导航