dangdangA

导航

2019年12月24日 #

Python中绘制箭头

摘要: 以两个点为例,其中起点为点(1,2),终点为点(3,4) 1 import matplotlib.pyplot as plt 2 def drawArrow(A,B): 3 fig = plt.figure() 4 ax = fig.add_subplot(111) 5 """ 6 箭头起始位置(A 阅读全文

posted @ 2019-12-24 16:27 dangdangA 阅读(10906) 评论(0) 推荐(0) 编辑

Python活力练习Day7

摘要: Day7:写出一个程序,接受一个由字母和数字组成的字符串和一个字符,输出输入字符串中含有该字符的个数,不区分大小写 eg:input : a = '123ASVFBVESS' b = 's' output : 3 方法一:先来一个比较繁琐的版本,时间复杂度为O(n) 1 def countA(): 阅读全文

posted @ 2019-12-24 08:47 dangdangA 阅读(214) 评论(0) 推荐(0) 编辑