Python Project with Code | Cricket Score Tracker | 5 Days 5 Python Projects

  Рет қаралды 5,709

PW Skills Tech

PW Skills Tech

Күн бұрын

Join us on the first day of our Python series #5Days5PythonProjects as Vishwa Mohan, CIO of PW, walks you through the creation of a dynamic Cricket Score App. A blend of cricket excitement and coding challenge awaits!
In this video:
Step-by-step instructions to build the app.
Insights from our expert, Vishwa Mohan.
Practical application of Python
Enrol now in Decode Data Science With Machine Learning : bit.ly/3SrqnAK
To enhance your learning experience, download the project code and follow along : bit.ly/3tUVZVb
Stay connected by subscribing. More enriching projects coming up in this series!
#PWSkills #BasEkSkill
-------------------------------------------------------
📲 PW App/Website: physicswallah.onelink.me/ZAZB...
🌐 PW Skills Website: pwskills.com/
📚 PW Store: physicswallah.onelink.me/ZAZB...
-------------------------------------------------------
📌 𝐏𝐖 𝐒𝐤𝐢𝐥𝐥𝐬 𝐓𝐞𝐜𝐡 𝐒𝐎𝐂𝐈𝐀𝐋 𝐌𝐄𝐃𝐈𝐀 -
🌐 Telegram: t.me/SkillsPW
🌐 Instagram: / pw.skills
-------------------------------------------------------
📌 𝐑𝐄𝐂𝐎𝐌𝐌𝐄𝐍𝐃𝐄𝐃 𝐂𝐇𝐀𝐍𝐍𝐄𝐋𝐒 𝐅𝐎𝐑 𝐘𝐎𝐔 -
🌐 Physics Wallah - Alakh Pandey: / @physicswallah
🌐 College Wallah: / @collegewallahbypw
🌐 JEE Wallah: / @pw-jeewallah
🌐 JEE Challengers by PW: / @jeechallengersbypw
🌐 GATE Wallah: / @gatewallahbypw
🌐 GATE Wallah - EC,EE & CS: / @gatewallah_ee_ec_cs
🌐 GATE Wallah - ME, CE & XE: / @gatewallah_me_ce_xe
-------------------------------------------------------
📌 𝐏𝐇𝐘𝐒𝐈𝐂𝐒 𝐖𝐀𝐋𝐋𝐀𝐇 𝐒𝐎𝐂𝐈𝐀𝐋 𝐌𝐄𝐃𝐈𝐀 -
🌐 Telegram: t.me/Physics_Wallah_Official_...
🌐 Instagram: / physicswallah
🌐 Facebook: / physicswallah
🌐 Twitter: / physics__wallah
🌐 LinkedIn: / physicswallah
-------------------------------------------------------
00:00:00 - Introduction
00:01:25 - Project to be built today
00:03:37 - Downloading relevant extensions for creating a Python project in VS Code
00:06:00 - Steps identified to build the application
00:07:13 - Designing the GUI and label
00:22:22 - Understanding and applying the concept of Web Scraping to fetch the match details in our designed application
01:05:16 - Running the final application
📌 For any Queries or Complaints visit: bit.ly/PW_Queries OR give a Missed Call on 07019-243-492
-------------------------------------------------------
#PythonProject #PythonProjectForBeginners #BasEkSkill #PWSkillsTech #PWSkills #PhysicsWallah

Пікірлер: 21
@PWSkillsTech
@PWSkillsTech 8 ай бұрын
Enrol now in Decode Data Science With Machine Learning : bit.ly/3SrqnAK To enhance your learning experience, download the project code and follow along : bit.ly/3tUVZVb
@shivani7359
@shivani7359 8 ай бұрын
Simply amazing sir !!!! Thanks PWSkills...please aise hi content banaya karo ... so easy to learn n understand
@user-ic9pf4tt1e
@user-ic9pf4tt1e 8 ай бұрын
This is so amazing.. have just finished first 5 mins, but can't wait more to thank you sir for this !!! .... Just love learning from you sir, the best teacher ever 💚
@crown8887
@crown8887 8 ай бұрын
08:29 There are many but Tkinter,pyqt are two most prefferable. 11:29 Constructors are the pre defined templates for a class. In python we can define it by using this syntax inside the class: def __init__(self): ... 17:46 we use if __name__ == '__main__': main() To strictly check that the function run from the file where it is defiend i.e we can't import it or run it. And other one is to check that the code executed from __main__ area(scope).
@solarsystem9156
@solarsystem9156 6 ай бұрын
class CricketScore: #Constructor def __init__(self, rootWindow): #All score is going to be in rootWindow, so we are adding it in constructor self.rootWindow = rootWindow #self = referencing object of a class self.rootWindow.title("LIVE CRICKET SCORE") self.rootWindow.geometry('800x500') self.bg = ImageTk.PhotoImage(file="Cricket.jpg") #bg = background bg = Label(self.rootWindow, image=self.bg).place(x=0,y=0) #Let's give a label to my GUI self.label = Label(self.rootWindow, text='Live Matches', font=("times new roman",60), compound='center').pack(padx=100, pady=50) #Fetch the live match details and set it in my GUI self.var = StringVar() self.matches = self.match_details() self.data = [ i for i in self.matches.keys()] self.cb = Combobox(self.rootWindow, values = self.data, width = 50) self.cb.place(x= 250, y = 200) #Button to check the details of my match self.b1 = Button(self.rootWindow, text="Check Score", font=("times new roman", 15), command = self.show_match_details).palce(x=50, y=380) #Creating command for the check score button def select(self): return self.cb.get() #Show match details def show_match_details(self): #Building the match detail frame self.frame1 = Frame(self.rootWindow, bg="#ADD8E6") self.frame1.place(x=180, y=280, width= 600, height =200) #Fetching details of the match x = self.matches[self.select()] #Displaying team names Label(self.frame1, text=self.select() + "-" + x['match_header'], font=("times new roman", 15,"bold"), bg="#ADD8E6", bd=0).place(x=150, y=15) #Displaying details of the match Label(self.frame1, text="Score Details: ", font=("times new roman", 10,"bold"), bg="#ADD8E6", fg="black", bd=0).place(x=10, y=40) Label(self.frame1, text=x['score card'], font=("times new roman", 10,"bold"), bg="#ADD8E6", fg="black", bd=0).place(x=20, y=60) Label(self.frame1, text="Summary: ", font=("times new roman", 10,"bold"), bg="#ADD8E6", fg="black", bd=0).place(x=10, y=100) Label(self.frame1, text=x['summary'], font=("times new roman", 10,"bold"), bg="#ADD8E6", fg="black", bd=0).place(x=20, y=120) #We will load all the matches details def match_details(self): #To scrap the data details = self.scrap() #it will details of all the score cards #Need to parse and read the relavant data live_match = {} for detail in details: live_team_details = {} summary = self.match_summary(detail) if summary is not None : match_header = self.match_header(detail).text teams = self.teams_name(detail) score_card = self.team_score(detail) live_team_details['summary'] = summary.text live_team_details['match_header'] = match_header live_team_details['score card'] = score_card[0]+ "::" +score_card[1] live_match[teams[0] + "vs" + teams[1]] = live_team_details return live_match #Function to fetch team scores def team_score(self, detail): t = [] team1_details = detail.find("div", class_ = "cb-hmscg-bat-txt").text team2_details = detail.find("div", class_ = "cb-hmscg-bwl-txt").text t.append(team1_details) t.append(team2_details) return t #Function to fetch the team names def teams_name(self, detail): t = [] team1_details = detail.find("div", class_="cb-hmscg-bat-txt").text #"\d" locates where first digit comes team1_index = re.search(r"\d", team1_details).start() if re.search(r"\d", team1_details) else len(team1_details) team2_details = detail.find("div", class_="cb-hmscg-bwl-txt").text team2_index = re.search(r"\d", team2_details).start() if re.search(r"\d", team2_details) else len(team2_details) # ERROR HERE IN TEAM 2 ! t.append(team1_details[:team1_index]) t.append(team2_details[:team2_index]) return t #Function to fetch a given match summary def match_summary(self, detail): return detail.find("div", class_="cb-mtch-crd-state") #Function to fetch match header def match_header(self,detail): return detail.find("div", class_="cb-mtch-crd-hdr") #Function to scrap the website cricbuzz def scrap(self): URL = "www.cricbuzz.com/" page = requests.get(URL) #gets all html content #parse this response and fetch the relevant data soup = BeautifulSoup(page.content, "html.parser") results = soup.find(id="match_menu_container") scrap_results = results.find_all("li", class_="cb-match-card") return scrap_results #Main function to start application def main(): #Start the GUI Window rootWindow = Tk()#refer gpt for tk() #Fetch the cricket score obj = CricketScore(rootWindow) #Keep on displaying the GUI Window to fetch the live updates rootWindow.mainloop() #Execute this file if __name__ == '__main__': #..name.. , execute file , execute file --> part wala: name = main main() Output; AttributeError: 'NoneType' object has no attribute 'text' Sir why is it happening sir, on printing i m finding that, the bowling team name is not being printed for last match ! how to solve it sir ?
@abhisheksharmame
@abhisheksharmame 8 ай бұрын
Sir , please make these types of projects in java also
@user-xv4om2gz3y
@user-xv4om2gz3y 7 ай бұрын
sir it would be amazing to have these videos in english as well. I am your old student from relevel and I follow your journey very closely.
@Jaiprakash-ji3og
@Jaiprakash-ji3og 8 ай бұрын
Constructor are the function which are invoke when we create object of that class
@Tech_Enthusiasts_Shubham
@Tech_Enthusiasts_Shubham 8 ай бұрын
please bring one end to end python project with machine learning integrated in that along with deployment sir it is also really needed by you
@Jaiprakash-ji3og
@Jaiprakash-ji3og 8 ай бұрын
In python we define constructor but init method
@hariprasad9530
@hariprasad9530 7 ай бұрын
gui in python is tkinter
@shivani7359
@shivani7359 8 ай бұрын
When is the next project coming and what is that ?
@shishir_who
@shishir_who 8 ай бұрын
Tkinter is used to make GUI
@themusichub3730
@themusichub3730 8 ай бұрын
Also make that kind of project series for JAVA.
@preethamtr2495
@preethamtr2495 8 ай бұрын
we want java projects as well ,please
@prajwalkulkarni9533
@prajwalkulkarni9533 8 ай бұрын
Tkinter library
@GoogleSoftwareEnginear
@GoogleSoftwareEnginear 8 ай бұрын
Sir please provide the whole code of this project Or if anyone shares the code
@sohamsonwane1534
@sohamsonwane1534 8 ай бұрын
gui class
@Laxmankumar-fq1ns
@Laxmankumar-fq1ns 7 ай бұрын
turtle tkinter
@Jaiprakash-ji3og
@Jaiprakash-ji3og 8 ай бұрын
Tkinter
Python Project with Code | Face Recognition | 5 Days 5 Python Projects
19:42
OMG😳 #tiktok #shorts #potapova_blog
00:58
Potapova_blog
Рет қаралды 4,3 МЛН
World’s Deadliest Obstacle Course!
28:25
MrBeast
Рет қаралды 155 МЛН
3 PYTHON AUTOMATION PROJECTS FOR BEGINNERS
17:00
Internet Made Coder
Рет қаралды 1,5 МЛН
__new__ vs __init__ in Python
10:50
mCoding
Рет қаралды 206 М.
Physicists Claim They Can Send Particles Into the Past
7:21
Sabine Hossenfelder
Рет қаралды 260 М.
Operation Hellstorm
41:10
cubicmetre
Рет қаралды 180 М.
The 7 Most Important Skill Sets For ML Engineers
20:53
Boris Meinardus
Рет қаралды 13 М.
Why Become A Data Scientist In 2023?🤔| Complete Roadmap
8:32
PW Skills Tech
Рет қаралды 14 М.
5 Awful Python Mistakes To Avoid
22:13
Indently
Рет қаралды 23 М.
AI Tools Masterclass | Learn These Tools to Boost Productivity 10X
40:20
OMG😳 #tiktok #shorts #potapova_blog
00:58
Potapova_blog
Рет қаралды 4,3 МЛН