你值得拥有——流星雨下的告白(Python实现)(1),0基础学Python开发

先自我介绍一下,小编浙江大学毕业,去过华为、字节跳动等大厂,目前阿里P7

深知大多数程序员,想要提升技能,往往是自己摸索成长,但自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!

因此收集整理了一份《2024年最新Python全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友。
img
img



既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上Python知识点,真正体系化!

由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新

如果你需要这些资料,可以添加V获取:vip1024c (备注Python)
img

正文

3 浪漫的流星雨展示

动态视频最近几天由于后台服务器升级,所以视频过几天我上传上来。

4 Python代码

def bgpic(self, picname=None):

“”"Set background image or return name of current backgroundimage.

Optional argument:

picname – a string, name of a gif-file or “nopic”.

If picname is a filename, set the corresponding image as background.

If picname is “nopic”, delete backgroundimage, if present.

If picname is None, return the filename of the current backgroundimage.

Example (for a TurtleScreen instance named screen):

screen.bgpic()

‘nopic’

screen.bgpic(“landscape.gif”)

screen.bgpic()

‘landscape.gif’

“”"

if picname is None:

return self._bgpicname

if picname not in self._bgpics:

self._bgpics[picname] = self._image(picname)

self._setbgpic(self._bgpic, self._bgpics[picname])

self._bgpicname = picname

coding: utf-8

import pygame

import os

import sys

from pygame.locals import *

os.chdir(‘E:/星空下的告白’)

os.getcwd()

pygame.init()

pygame.mixer.init()

pygame.mixer.music.load(“星空之美.mp3”)

pygame.mixer.music.set_volume(0.4)

pygame.mixer.music.play()

bg_size = width, height = 300, 200

bg_rgb = (255, 255, 255)

screen1 = pygame.display.set_mode(bg_size)

pygame.display.set_caption(“告白音乐”)

clock = pygame.time.Clock()

pause_rect = pause_image.get_rect()

print(pause_rect.width, pause_rect.height)

pause_rect.left, pause_rect.top = (width - pause_rect.width) // 2, (height - pause_rect.height) // 2

from turtle import *

from random import random, randint

os.chdir(‘E:星空下的告白’)

screen = Screen()

width, height = 900, 700

screen.setup(width, height)

screen.title(“浪漫的流星雨”)

screen.bgcolor(“black”)

screen.mode(“logo”)

screen.delay(0)

printer = Turtle()

printer.hideturtle()

printer.penup()

printer.color(‘red’)

printer.goto(-100, -350)

printer.write(“宇宙广阔(弱水三千)”“\n\n”, move=True, align=“left”, font=(“Italic”, 30, “bold”))

printer.goto(-50, -400)

printer.write(“只寻你一颗!(只取一瓢饮!)\n\n”, move=True, align=“left”, font=(“Italic”, 30, “bold”))

t = Turtle(visible=False, shape=‘circle’)

t.pencolor(“white”)

t.fillcolor(“white”)

t.penup()

t.setheading(-90)

t.goto(width / 2, randint(-height / 2, height / 2))

stars = []

for i in range(300):

star = t.clone()

s = random() / 3

if s > 0.01 and s < 0.03:

star.pencolor(“black”)

star.fillcolor(“black”)

elif s > 0.03 and s < 0.04:

star.pencolor(“lightcoral”)

star.fillcolor(“lightcoral”)

elif s > 0.05 and s < 0.1:

star.pencolor(“green”)

star.fillcolor(“green”)

elif s > 0.15 and s < 0.16:

star.pencolor(“yellow”)

star.fillcolor(“yellow”)

elif s > 0.19 and s < 0.2:

star.pencolor(“red”)

star.fillcolor(“red”)

elif s > 0.21 and s < 0.22:

star.pencolor(“purple”)

star.fillcolor(“purple”)

elif s > 0.29 and s < 0.3:

star.pencolor(“darkorange”)

star.fillcolor(“darkorange”)

elif s > 0.31 and s < 0.32:

star.pencolor(“red”)

star.fillcolor(“yellow”)

elif s > 0.32 and s < 0.33:

star.pencolor(“yellow”)

star.fillcolor(“white”)

star.shapesize(s, s)

star.speed(int(s * 30))

star.setx(width / 2 + randint(1, width))

一、Python所有方向的学习路线

Python所有方向路线就是把Python常用的技术点做整理,形成各个领域的知识点汇总,它的用处就在于,你可以按照上面的知识点去找对应的学习资源,保证自己学得较为全面。

二、学习软件

工欲善其事必先利其器。学习Python常用的开发软件都在这里了,给大家节省了很多时间。

三、入门学习视频

我们在看视频学习的时候,不能光动眼动脑不动手,比较科学的学习方法是在理解之后运用它们,这时候练手项目就很适合了。

网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。

需要这份系统化的资料的朋友,可以添加V获取:vip1024c (备注python)
img

一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!
FF,t_70,g_se,x_16#pic_center)

网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。

需要这份系统化的资料的朋友,可以添加V获取:vip1024c (备注python)
[外链图片转存中…(img-Jg1tj8mW-1713454887279)]

一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!

  • 25
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值