猫史档案馆


【Python作品分享】没信号【作品秀】

用户:沉著的飞叶龙uZWJ沉著的飞叶龙uZWJ查看:0 回复:3 评论:0 创建时间:2020-04-11T17:12:34


【作品展示】

center_image

 

【作品介绍】

可以让你的电脑没信号

(假的)

 

【作品源代码】

import matplotlib.pyplot as plt
import random as r
from PIL import Image as im
i = im.open('Figure1.jpg')#换成你电脑里的图片,随便哪张都可以
a,b=i.size
plt.title('NO Signal')
while 74:
    for c in range(a):
        for j in range(b):
            i.putpixel((c, j), (r.randint(0, 255),
                       r.randint(0, 255), r.randint(0, 255)))
    plt.rcParams['image.cmap'] = 'gray'
    plt.imshow(i)
    plt.pause(0.01)
    plt.ion()
#告诉你,关不掉的

 

【提示】

部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:

https://python.codemao.cn


回复

上一页1 页 / 共 1下一页
沉著的飞叶龙uZWJ沉著的飞叶龙uZWJ

有人吗?

点赞0


评论


LAG的1048576一枚LAG的1048576一枚

CTRL-C

点赞0


评论


cool-creepercool-creeper

什么意思?

点赞0


评论