![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
z_y_ning
时间从不停息它的脚步,我们不是在追赶,是在沉淀。
展开
-
python图像处理
图片读取与显示# author:Annie time:2020/11/9import matplotlib.pyplot as pltimport matplotlib.image as mplimgimg = mplimg.imread("C:\\Users\\BaoDing\\PycharmProjects\\test1102\\lane.jpg")plt.imshow(img)plt.show()效果图:注意点:1.1 绝对路径和相对路径1.2 显示不出图片时加上最后一.原创 2020-11-09 13:50:57 · 174 阅读 · 0 评论 -
Python随便练练
定义一个变量,如果这个变量大于60就打印,恭喜您考试及格,如果这个变量小于60,兄dei再接再厉。a=70if a>=60: print("兄dei你及格啦!")else: print("兄dei你需要再接再厉!")输出:兄dei你及格啦!交互式a=int(input("请输入您的成绩:"))if a>=60: print("兄dei你及格...原创 2019-12-01 23:07:16 · 2365 阅读 · 0 评论 -
codewars5 Replace With Alphabet Position
InstructionsWelcome.In this kata you are required to, given a string, replace every letter with its position in the alphabet.If anything in the text isn’t a letter, ignore it and don’t return it.“...原创 2019-10-14 19:47:36 · 194 阅读 · 0 评论 -
codewars4 Credit Card Mask
InstructionsUsually when you buy something, you’re asked whether your credit card number, phone number or answer to your most secret question is still correct. However, since someone could look over ...原创 2019-10-11 20:31:14 · 205 阅读 · 0 评论 -
绝对路径问题
在Python 3.7.3 Shell中尝试书中绝对文件路径的代码,将文件放到桌面调用,翻查网上各种说法,写出以下四种类型的结果:除了第三种提示错误其它全部正常输出。还有很多问题来源于单词拼错,一定注意。...原创 2019-09-24 17:17:39 · 133 阅读 · 0 评论 -
codewars1 调整句子顺序
IntroductionYour task is to sort a given string. Each word in the string will contain a single number. This number is the position the word should have in the result.Note: Numbers can be from 1 to 9...原创 2019-10-11 15:06:15 · 208 阅读 · 0 评论 -
codewars2 Shortest Word
InstructionsSimple, given a string of words, return the length of the shortest word(s).String will never be empty and you do not need to account for different data types.solution:def find_short(s)...原创 2019-10-11 16:12:43 · 209 阅读 · 0 评论 -
codewars3 Who likes it?
InstructionsYou probably know the “like” system from Facebook and other pages. People can “like” blog posts, pictures or other items. We want to create the text that should be displayed next to such ...原创 2019-10-11 16:31:49 · 234 阅读 · 0 评论