Here is the code to make a Pac-Man game ππΌ
- Install Pygame if you donβt have it already:
Python Code for a Basic Pac-Man Game:
- Install Pygame if you donβt have it already:
pip install pygamePython Code for a Basic Pac-Man Game:
import pygame
import sys
# Initialize Pygame
pygame.init()
# Screen settings
WIDTH, HEIGHT = 600, 400
screen = pygame.display.set_mode((WIDTH, HEIGHT))
pygame.display.set_caption("Pac-Man Game")
# Colors
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
YELLOW = (255, 255, 0)
RED = (255, 0, 0)
# Clock for frame rate
clock = pygame.time.Clock()
FPS = 30
# Pac-Man settings
pacman_size = 20
pacman_x, pacman_y = WIDTH // 2, HEIGHT // 2
pacman_speed = 5
pacman_dir = "RIGHT"
# Ghost settings
ghost_size = 20
ghost_x, ghost_y = 100, 100
ghost_speed = 2
# Collectibles (dots)
dots = [(50, 50), (150, 100), (300, 200), (400, 300), (500, 150)]
dot_radius = 5
# Score
score = 0
# Game loop
running = True
while running:
screen.fill(BLACK)
# Handle events
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
# Move Pac-Man
keys = pygame.key.get_pressed()
if keys[pygame.K_UP]:
pacman_y -= pacman_speed
pacman_dir = "UP"
if keys[pygame.K_DOWN]:
pacman_y += pacman_speed
pacman_dir = "DOWN"
if keys[pygame.K_LEFT]:
pacman_x -= pacman_speed
pacman_dir = "LEFT"
if keys[pygame.K_RIGHT]:
pacman_x += pacman_speed
pacman_dir = "RIGHT"
# Keep Pac-Man on screen
pacman_x = max(0, min(WIDTH - pacman_size, pacman_x))
pacman_y = max(0, min(HEIGHT - pacman_size, pacman_y))
# Draw Pac-Man
if pacman_dir == "RIGHT":
pygame.draw.pacman = pygame.draw.polygon(screen, YELLOW, [(pacman_x + pacman_size, pacman_y + pacman_size )π17β€5π₯°3
β€2
Wish you a very Happy New Year! π May this year bring you success, happiness, and endless opportunities to shine
β€4π3
import os
import subprocess
def get_connected_devices():
"""
Fetch a list of devices connected to your Wi-Fi network using ARP.
"""
try:
print("Fetching connected devices...")
devices = subprocess.check_output("arp -a", shell=True).decode()
print("Connected Devices:\n", devices)
except Exception as e:
print("Error fetching connected devices:", e)
def change_wifi_password(ssid, new_password):
"""
Update the Wi-Fi password on the router using the router's admin panel.
"""
print(f"Make sure to log in to your router's admin panel to change the password for Wi-Fi network: {ssid}")
print(f"Set the new password to: {new_password}")
def block_device(mac_address):
"""
Block a specific device from your network using its MAC address.
"""
try:
print(f"Blocking device with MAC address: {mac_address}...")
command = f"netsh wlan block allowmac={mac_address}"
os.system(command)
print(f"Device {mac_address} has been blocked.")
except Exception as e:
print("Error blocking device:", e)
def secure_wifi():
"""
Perform basic Wi-Fi security tasks.
"""
print("Securing your Wi-Fi network...\n")
# Step 1: Get a list of connected devices
get_connected_devices()
# Step 2: Change Wi-Fi password
ssid = input("\nEnter your Wi-Fi SSID: ")
new_password = input("Enter a new strong password for your Wi-Fi: ")
change_wifi_password(ssid, new_password)
# Step 3: Block suspicious devices
block_option = input("\nDo you want to block a suspicious device? (yes/no): ").strip().lower()
if block_option == "yes":
mac_address = input("Enter the MAC address of the device to block: ").strip()
block_device(mac_address)
print("\nWi-Fi security measures applied. Ensure your router settings are up-to-date!")
# Run the Wi-Fi security tool
secure_wifi()
import subprocess
def get_connected_devices():
"""
Fetch a list of devices connected to your Wi-Fi network using ARP.
"""
try:
print("Fetching connected devices...")
devices = subprocess.check_output("arp -a", shell=True).decode()
print("Connected Devices:\n", devices)
except Exception as e:
print("Error fetching connected devices:", e)
def change_wifi_password(ssid, new_password):
"""
Update the Wi-Fi password on the router using the router's admin panel.
"""
print(f"Make sure to log in to your router's admin panel to change the password for Wi-Fi network: {ssid}")
print(f"Set the new password to: {new_password}")
def block_device(mac_address):
"""
Block a specific device from your network using its MAC address.
"""
try:
print(f"Blocking device with MAC address: {mac_address}...")
command = f"netsh wlan block allowmac={mac_address}"
os.system(command)
print(f"Device {mac_address} has been blocked.")
except Exception as e:
print("Error blocking device:", e)
def secure_wifi():
"""
Perform basic Wi-Fi security tasks.
"""
print("Securing your Wi-Fi network...\n")
# Step 1: Get a list of connected devices
get_connected_devices()
# Step 2: Change Wi-Fi password
ssid = input("\nEnter your Wi-Fi SSID: ")
new_password = input("Enter a new strong password for your Wi-Fi: ")
change_wifi_password(ssid, new_password)
# Step 3: Block suspicious devices
block_option = input("\nDo you want to block a suspicious device? (yes/no): ").strip().lower()
if block_option == "yes":
mac_address = input("Enter the MAC address of the device to block: ").strip()
block_device(mac_address)
print("\nWi-Fi security measures applied. Ensure your router settings are up-to-date!")
# Run the Wi-Fi security tool
secure_wifi()
π6
Top 5 In-Demand Skills for Students in 2025 π―
1οΈβ£ Cybersecurity
π https://youtu.be/v3iUx2SNspY?si=hPksJY9ycgqQwwU1
2οΈβ£ Data Analytics
π https://youtu.be/VaSjiJMrq24?si=fdhjQCebSQp7EW7i
3οΈβ£ Data Science
π https://youtu.be/gDZ6czwuQ18?si=lhak4XJzOTa2diBo
4οΈβ£ Generative AI
π https://youtu.be/mEsleV16qdo?si=WFucxrox6ELNCZPZ
5οΈβ£ Machine Learning
π https://youtu.be/LvC68w9JS4Y?si=DAJFSG-ZF6oFn-B
1οΈβ£ Cybersecurity
π https://youtu.be/v3iUx2SNspY?si=hPksJY9ycgqQwwU1
2οΈβ£ Data Analytics
π https://youtu.be/VaSjiJMrq24?si=fdhjQCebSQp7EW7i
3οΈβ£ Data Science
π https://youtu.be/gDZ6czwuQ18?si=lhak4XJzOTa2diBo
4οΈβ£ Generative AI
π https://youtu.be/mEsleV16qdo?si=WFucxrox6ELNCZPZ
5οΈβ£ Machine Learning
π https://youtu.be/LvC68w9JS4Y?si=DAJFSG-ZF6oFn-B
YouTube
Cyber Security Full Course for Beginners in 11 Hours - 2025 Edition
Cyber Security Full Course for Beginners in 11 Hours - 2025 Edition
π΄ To learn Ethical Hacking Course online with regular LIVE CLASSES, enroll now: https://www.wscubetech.com/landing-pages/online-ethical-hacking-course.html?utm_source=YouTube&utm_mediumβ¦
π΄ To learn Ethical Hacking Course online with regular LIVE CLASSES, enroll now: https://www.wscubetech.com/landing-pages/online-ethical-hacking-course.html?utm_source=YouTube&utm_mediumβ¦
π3
free courses
1. Introduction to Generative AI
https://lnkd.in/gnSN7HP2
2. Google Data Analytics Professional Certificate
https://lnkd.in/ghknERaS
3. Agile Project Management
https://lnkd.in/g8vWniyi
4. Project Execution: Running the Project
https://lnkd.in/gsPQUwEb
5. Foundations of Project Management
https://lnkd.in/gCUVJVZd
6. Project Initiation: Starting a Successful Project
https://lnkd.in/gsxSBfwc
7. Project Planning: Putting It All Together
https://lnkd.in/ghbFf53S
8. Google Data Analytics:
https://lnkd.in/gJERiGi4
9. Fundamentals of digital marketing
https://lnkd.in/gMC7_uF8
10. Get Started with Python
https://lnkd.in/grjFzDif
11. Learn Python Basics for Data Analysis
https://lnkd.in/gMXMsS_Z
12. Data, ML, and AI in Google Cloud
https://lnkd.in/gQ46XgH4?
13. Google Cloud Computing Foundations: Networking and Security in Google Cloud
https://lnkd.in/gited4Gn?
14. Google Advanced Data Analytics Capstone
https://lnkd.in/gvviE9-m
15. Data Analysis with R Programming
https://lnkd.in/gX8Qk4tX
1. Introduction to Generative AI
https://lnkd.in/gnSN7HP2
2. Google Data Analytics Professional Certificate
https://lnkd.in/ghknERaS
3. Agile Project Management
https://lnkd.in/g8vWniyi
4. Project Execution: Running the Project
https://lnkd.in/gsPQUwEb
5. Foundations of Project Management
https://lnkd.in/gCUVJVZd
6. Project Initiation: Starting a Successful Project
https://lnkd.in/gsxSBfwc
7. Project Planning: Putting It All Together
https://lnkd.in/ghbFf53S
8. Google Data Analytics:
https://lnkd.in/gJERiGi4
9. Fundamentals of digital marketing
https://lnkd.in/gMC7_uF8
10. Get Started with Python
https://lnkd.in/grjFzDif
11. Learn Python Basics for Data Analysis
https://lnkd.in/gMXMsS_Z
12. Data, ML, and AI in Google Cloud
https://lnkd.in/gQ46XgH4?
13. Google Cloud Computing Foundations: Networking and Security in Google Cloud
https://lnkd.in/gited4Gn?
14. Google Advanced Data Analytics Capstone
https://lnkd.in/gvviE9-m
15. Data Analysis with R Programming
https://lnkd.in/gX8Qk4tX
lnkd.in
LinkedIn
This link will take you to a page thatβs not on LinkedIn
β€6π6
1. Google Ads Training By Google's Skillshop
β’ Time: 28h24m
β’ Certification: Yes
β’ Cost: Free
Link: https://lnkd.in/g2MTic-e
2. Microsoft Advertising PPC Certification
β’ Time: 8h40m
β’ Certification: Yes
β’ Cost: Free
Link: https://lnkd.in/g25Ux_DG
3. Google Ads for Beginners By Coursera
β’ Time: 2h
β’ Certification: Yes
β’ Cost: Free
Link: https://lnkd.in/g8CWU7Cy
4. Google Ads Search Campaign By Coursera
β’ Time: 2h
β’ Certification: Yes
β’ Cost: Free
Link: https://lnkd.in/gggn9R_A
5. Google Ads Essential Training by LinkedIn
β’ Time: 2h24m
β’ Certification: Yes
β’ Cost: Free
Link: https://lnkd.in/g23Ue82b
6. Advanced Google Ads by LinkedIn
β’ Time: 2h02m
β’ Certification: Yes
β’ Cost: Free
Link: https://lnkd.in/gq323P3D
7. PPC Fundamentals Course By Semrush
β’ Time: 5h
β’ Certification: Yes
β’ Cost: Free
Link: https://lnkd.in/gxDrBiPu
8. PPC Foundations by Simplilearn
β’ Time: 4h
β’ Certification: Yes
β’ Cost: Free
Link: https://lnkd.in/grSpMvNb
9. Diploma in Google Ads By Alison
β’ Time: 15h
β’ Certification: Yes
β’ Cost: Free
Link: https://lnkd.in/gifrQaq4
β’ Time: 28h24m
β’ Certification: Yes
β’ Cost: Free
Link: https://lnkd.in/g2MTic-e
2. Microsoft Advertising PPC Certification
β’ Time: 8h40m
β’ Certification: Yes
β’ Cost: Free
Link: https://lnkd.in/g25Ux_DG
3. Google Ads for Beginners By Coursera
β’ Time: 2h
β’ Certification: Yes
β’ Cost: Free
Link: https://lnkd.in/g8CWU7Cy
4. Google Ads Search Campaign By Coursera
β’ Time: 2h
β’ Certification: Yes
β’ Cost: Free
Link: https://lnkd.in/gggn9R_A
5. Google Ads Essential Training by LinkedIn
β’ Time: 2h24m
β’ Certification: Yes
β’ Cost: Free
Link: https://lnkd.in/g23Ue82b
6. Advanced Google Ads by LinkedIn
β’ Time: 2h02m
β’ Certification: Yes
β’ Cost: Free
Link: https://lnkd.in/gq323P3D
7. PPC Fundamentals Course By Semrush
β’ Time: 5h
β’ Certification: Yes
β’ Cost: Free
Link: https://lnkd.in/gxDrBiPu
8. PPC Foundations by Simplilearn
β’ Time: 4h
β’ Certification: Yes
β’ Cost: Free
Link: https://lnkd.in/grSpMvNb
9. Diploma in Google Ads By Alison
β’ Time: 15h
β’ Certification: Yes
β’ Cost: Free
Link: https://lnkd.in/gifrQaq4
lnkd.in
LinkedIn
This link will take you to a page thatβs not on LinkedIn
π8β€2
Useful Excel Shortcuts:
β Ctrl + A: Select all contents of the page.
β Ctrl + B: Bold highlighted selection.
β Ctrl + C: Copy selected text.
β Ctrl + X: Cut selected text.
β Ctrl + P: Open the print window.
β Ctrl + F: Open find box.
βCtrl + I: Italic highlighted selection.
β Ctrl + K: Insert link (Shortcut Keys and their Functions).
β Ctrl + U: Underline highlighted selection.
β Ctrl + V: Paste.
β Ctrl + Y: Redo the last action performed.
β Ctrl + Z: Undo last action.
β Ctrl + L: Aligns the line or selected text to the left of the screen.
β Ctrl + E: Aligns the line or selected text to the center of the screen.
β Ctrl + R: Aligns the line or selected text to the right of the screen.
β Ctrl + M: Indent the paragraph.
β Ctrl + Shift + F: Change the font.
β Ctrl + Shift + >: Increase selected font +1pts up to 12pt and then increases font +2pts.
β Ctrl + ]: Increase selected font +1pts.
β Ctrl + Shift + <: Decrease selected font -1pts if 12pt or lower, if above 12 decreases font by +2pt.
β Ctrl + [: Decrease selected font -1pts.
β Ctrl + Shift + *: View or hide non printing characters.
β Ctrl + L: Moves one word to the left.
β Ctrl + R: Moves one word to the right.
β Ctrl + : Moves to the beginning of the line or paragraph.
β Ctrl + : Moves to the end of the paragraph.
β Ctrl + Del: Deletes word to right of cursor.
β Ctrl + Backspace: Deletes word to left of cursor.
β Ctrl + End: Moves the cursor to the end of the
document.
β Ctrl + Home: Moves the cursor to the beginning of the document.
β Ctrl + Spacebar: Reset highlighted text to the default font.
β Ctrl + 1: Single-space lines.
β Ctrl + 2: Double-space lines.
β Ctrl + 5: 1.5-line spacing.
β Ctrl + Alt + 1: Changes text to heading 1.
β Ctrl + Alt + 2: Changes text to heading 2.
β Ctrl + Alt + 3: Changes text to heading 3.
β Alt + Shift + D: Insert the current date.
β Alt + Shift + T: Insert the current time.
β Alt + F: File menu options in current program.
β Alt + E: Edit options in current program.
β F1: Universal Help in almost every Windows program.
β Ctrl + A: Select all text.
β Ctrl + X: Cut
β Shift + Del: Cut selected item.
β Ctrl + C: Copy selected item.
β Ctrl + Ins: Copy selected item.
β Ctrl + V: Paste selected item.
β Shift + Ins: Paste.
β Home: Goes to beginning of current line.
β Ctrl + Home: Goes to beginning of document.
β End: Goes to end of current line.
β Ctrl + End: Goes to end of document.
β Shift + Home: Highlights from current position to beginning of line.
β Shift + End: Highlights from current position to end of line.
β Ctrl + Left arrow: Moves one word to the left at a time.
β Ctrl + Right arrow: Moves one word to the right at a time.
β Ctrl + A: Select all contents of the page.
β Ctrl + B: Bold highlighted selection.
β Ctrl + C: Copy selected text.
β Ctrl + X: Cut selected text.
β Ctrl + P: Open the print window.
β Ctrl + F: Open find box.
βCtrl + I: Italic highlighted selection.
β Ctrl + K: Insert link (Shortcut Keys and their Functions).
β Ctrl + U: Underline highlighted selection.
β Ctrl + V: Paste.
β Ctrl + Y: Redo the last action performed.
β Ctrl + Z: Undo last action.
β Ctrl + L: Aligns the line or selected text to the left of the screen.
β Ctrl + E: Aligns the line or selected text to the center of the screen.
β Ctrl + R: Aligns the line or selected text to the right of the screen.
β Ctrl + M: Indent the paragraph.
β Ctrl + Shift + F: Change the font.
β Ctrl + Shift + >: Increase selected font +1pts up to 12pt and then increases font +2pts.
β Ctrl + ]: Increase selected font +1pts.
β Ctrl + Shift + <: Decrease selected font -1pts if 12pt or lower, if above 12 decreases font by +2pt.
β Ctrl + [: Decrease selected font -1pts.
β Ctrl + Shift + *: View or hide non printing characters.
β Ctrl + L: Moves one word to the left.
β Ctrl + R: Moves one word to the right.
β Ctrl + : Moves to the beginning of the line or paragraph.
β Ctrl + : Moves to the end of the paragraph.
β Ctrl + Del: Deletes word to right of cursor.
β Ctrl + Backspace: Deletes word to left of cursor.
β Ctrl + End: Moves the cursor to the end of the
document.
β Ctrl + Home: Moves the cursor to the beginning of the document.
β Ctrl + Spacebar: Reset highlighted text to the default font.
β Ctrl + 1: Single-space lines.
β Ctrl + 2: Double-space lines.
β Ctrl + 5: 1.5-line spacing.
β Ctrl + Alt + 1: Changes text to heading 1.
β Ctrl + Alt + 2: Changes text to heading 2.
β Ctrl + Alt + 3: Changes text to heading 3.
β Alt + Shift + D: Insert the current date.
β Alt + Shift + T: Insert the current time.
β Alt + F: File menu options in current program.
β Alt + E: Edit options in current program.
β F1: Universal Help in almost every Windows program.
β Ctrl + A: Select all text.
β Ctrl + X: Cut
β Shift + Del: Cut selected item.
β Ctrl + C: Copy selected item.
β Ctrl + Ins: Copy selected item.
β Ctrl + V: Paste selected item.
β Shift + Ins: Paste.
β Home: Goes to beginning of current line.
β Ctrl + Home: Goes to beginning of document.
β End: Goes to end of current line.
β Ctrl + End: Goes to end of document.
β Shift + Home: Highlights from current position to beginning of line.
β Shift + End: Highlights from current position to end of line.
β Ctrl + Left arrow: Moves one word to the left at a time.
β Ctrl + Right arrow: Moves one word to the right at a time.
π14π12β€8
Free Certification Courses to Learn Data Science in 2025:
1. Python
π imp.i384100.net/5gmXXo
2. SQL
π edx.org/learn/relationβ¦
3. Statistics and R
π edx.org/learn/r-prograβ¦
4. Data Science: R Basics
πedx.org/learn/r-prograβ¦
5. Excel and PowerBI
π learn.microsoft.com/en-gb/trainingβ¦
6. Data Science: Visualization
πedx.org/learn/data-visβ¦
7. Data Science: Machine Learning
πedx.org/learn/machine-β¦
8. R
πimp.i384100.net/rQqomy
9. Tableau
πimp.i384100.net/MmW9b3
10. PowerBI
π lnkd.in/dpmnthEA
11. Data Science: Productivity Tools
π lnkd.in/dGhPYg6N
12. Data Science: Probability
πmygreatlearning.com/academy/learn-β¦
13. Mathematics
πmatlabacademy.mathworks.com
14. Statistics
π lnkd.in/df6qksMB
15. Data Visualization
πimp.i384100.net/k0X6vx
16. Machine Learning
π imp.i384100.net/nLbkN9
17. Deep Learning
π imp.i384100.net/R5aPOR
18. Data Science: Linear Regression
πpll.harvard.edu/course/data-scβ¦
19. Data Science: Wrangling
πedx.org/learn/data-sciβ¦
20. Linear Algebra
π pll.harvard.edu/course/data-anβ¦
21. Probability
π pll.harvard.edu/course/data-scβ¦
22. Introduction to Linear Models and Matrix Algebra
πedx.org/learn/linear-aβ¦
23. Data Science: Capstone
π edx.org/learn/data-sciβ¦
24. Data Analysis
π pll.harvard.edu/course/data-anβ¦
25. IBM Data Science Professional Certificate
imp.i384100.net/9gxbbY
26. Neural Networks and Deep Learning
imp.i384100.net/DKrLn2
27. Supervised Machine Learning: Regression and Classification
imp.i384100.net/g1KJEA
1. Python
π imp.i384100.net/5gmXXo
2. SQL
π edx.org/learn/relationβ¦
3. Statistics and R
π edx.org/learn/r-prograβ¦
4. Data Science: R Basics
πedx.org/learn/r-prograβ¦
5. Excel and PowerBI
π learn.microsoft.com/en-gb/trainingβ¦
6. Data Science: Visualization
πedx.org/learn/data-visβ¦
7. Data Science: Machine Learning
πedx.org/learn/machine-β¦
8. R
πimp.i384100.net/rQqomy
9. Tableau
πimp.i384100.net/MmW9b3
10. PowerBI
π lnkd.in/dpmnthEA
11. Data Science: Productivity Tools
π lnkd.in/dGhPYg6N
12. Data Science: Probability
πmygreatlearning.com/academy/learn-β¦
13. Mathematics
πmatlabacademy.mathworks.com
14. Statistics
π lnkd.in/df6qksMB
15. Data Visualization
πimp.i384100.net/k0X6vx
16. Machine Learning
π imp.i384100.net/nLbkN9
17. Deep Learning
π imp.i384100.net/R5aPOR
18. Data Science: Linear Regression
πpll.harvard.edu/course/data-scβ¦
19. Data Science: Wrangling
πedx.org/learn/data-sciβ¦
20. Linear Algebra
π pll.harvard.edu/course/data-anβ¦
21. Probability
π pll.harvard.edu/course/data-scβ¦
22. Introduction to Linear Models and Matrix Algebra
πedx.org/learn/linear-aβ¦
23. Data Science: Capstone
π edx.org/learn/data-sciβ¦
24. Data Analysis
π pll.harvard.edu/course/data-anβ¦
25. IBM Data Science Professional Certificate
imp.i384100.net/9gxbbY
26. Neural Networks and Deep Learning
imp.i384100.net/DKrLn2
27. Supervised Machine Learning: Regression and Classification
imp.i384100.net/g1KJEA
Coursera
Python for Data Science, AI & Development
Offered by IBM. Kickstart your Python journey with this ... Enroll for free.