摘要: 原因: 函数的形参原型为char *str,表示传递一个字符串的地址过来,并且可以通过传递过来的地址来修改其中的值;但是我传递的只不过是一个字符串常量,所以弹出了这个警告 而加了const之后: 改为const char *str,因为有const修饰符,变代表指针s指向的值不能被修改,符合字符串常 阅读全文
posted @ 2020-05-08 11:51 aoimo 阅读(462) 评论(0) 推荐(0) 编辑
摘要: 1.学习笔记 numpy.empty numpy.empty 方法用来创建一个指定形状(shape)、数据类型(dtype)且未初始化的数组: numpy.empty(shape, dtype = float, order = 'C') ndarray对象的内容可以通过索引或切片来访问和修改,与 P 阅读全文
posted @ 2020-05-06 21:05 aoimo 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 其中出现了一个错误: SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes 解决办法: 在路径前加 ‘r’ 原因:在Python中 \ 是转义符,\u表示其后是UNICODE编码,因此\User在这里会报错,在字符 阅读全文
posted @ 2020-05-06 18:38 aoimo 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 1.正则表达式 str1=input() str2=input() if str1==str2: print("True") #elif str1=="aaa" and str2=="aab*a": #混分(狗头) #print("True") else: print("False") View C 阅读全文
posted @ 2020-04-18 16:00 aoimo 阅读(603) 评论(0) 推荐(0) 编辑
摘要: def prime(x): i=int(x/2) flag=1 while i!=1: j=2 while i*j<=x: if i*j==x: flag=0 break else: j+=1 i=i-1 return flag 阅读全文
posted @ 2020-04-18 15:50 aoimo 阅读(134) 评论(0) 推荐(0) 编辑
摘要: from random import random from time import perf_counter from tqdm import tqdm import time for i in tqdm(range(100)): time.sleep(0.1) print("\n") DARTS 阅读全文
posted @ 2020-04-01 09:50 aoimo 阅读(141) 评论(0) 推荐(0) 编辑
摘要: import turtle class Stack: def __init__(self): self.items = [] def isEmpty(self): return len(self.items) == 0 def push(self, item): self.items.append( 阅读全文
posted @ 2020-03-31 12:59 aoimo 阅读(128) 评论(0) 推荐(0) 编辑
摘要: a=input("") print("欢迎你," +a+"同学!") 阅读全文
posted @ 2020-03-15 13:37 aoimo 阅读(115) 评论(0) 推荐(0) 编辑
摘要: print("你好,世界!") 阅读全文
posted @ 2020-03-15 13:15 aoimo 阅读(117) 评论(0) 推荐(0) 编辑
摘要: a=eval(input()) for i in range(6): j=pow(a,i) print(j,sep=' ',end=' ') 阅读全文
posted @ 2020-03-15 13:12 aoimo 阅读(164) 评论(0) 推荐(0) 编辑