会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
gnaiqidom
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
下一页
2020年5月8日
warning: deprecated conversion from string constant to ‘char*’
摘要: 原因: 函数的形参原型为char *str,表示传递一个字符串的地址过来,并且可以通过传递过来的地址来修改其中的值;但是我传递的只不过是一个字符串常量,所以弹出了这个警告 而加了const之后: 改为const char *str,因为有const修饰符,变代表指针s指向的值不能被修改,符合字符串常
阅读全文
posted @ 2020-05-08 11:51 aoimo
阅读(486)
评论(0)
推荐(0)
2020年5月6日
科学计算和可视化
摘要: 1.学习笔记 numpy.empty numpy.empty 方法用来创建一个指定形状(shape)、数据类型(dtype)且未初始化的数组: numpy.empty(shape, dtype = float, order = 'C') ndarray对象的内容可以通过索引或切片来访问和修改,与 P
阅读全文
posted @ 2020-05-06 21:05 aoimo
阅读(163)
评论(0)
推荐(0)
使用numpy 和 PIL 手绘效果
摘要: 其中出现了一个错误: SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes 解决办法: 在路径前加 ‘r’ 原因:在Python中 \ 是转义符,\u表示其后是UNICODE编码,因此\User在这里会报错,在字符
阅读全文
posted @ 2020-05-06 18:38 aoimo
阅读(200)
评论(0)
推荐(0)
2020年4月18日
第六周作业
摘要: 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
阅读(625)
评论(0)
推荐(0)
常用系列01 判断是否素数
摘要: 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
阅读(136)
评论(0)
推荐(0)
2020年4月1日
有进度条的圆周率计算
摘要: 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
阅读(146)
评论(0)
推荐(0)
2020年3月31日
汉诺塔问题
摘要: 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
阅读(132)
评论(0)
推荐(0)
2020年3月15日
8.hello world!(欢迎同学)
摘要: a=input("") print("欢迎你," +a+"同学!")
阅读全文
posted @ 2020-03-15 13:37 aoimo
阅读(120)
评论(0)
推荐(0)
6.世界,你好!
摘要: print("你好,世界!")
阅读全文
posted @ 2020-03-15 13:15 aoimo
阅读(120)
评论(0)
推荐(0)
5.N的多次方
摘要: a=eval(input()) for i in range(6): j=pow(a,i) print(j,sep=' ',end=' ')
阅读全文
posted @ 2020-03-15 13:12 aoimo
阅读(174)
评论(0)
推荐(0)
上一页
1
2
3
下一页
公告