Skip to content

Cool #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 50 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
307c103
Add files via upload
Mmabiaa Nov 16, 2024
aa28c05
Add files via upload
Mmabiaa Nov 16, 2024
5c957b2
Add files via upload
Mmabiaa Nov 16, 2024
54d37e9
Add files via upload
Mmabiaa Nov 16, 2024
1d17414
Update hangman.py
Mmabiaa Nov 16, 2024
a57574a
Update Calender.py
Mmabiaa Nov 17, 2024
3e283c8
Add files via upload
Mmabiaa Nov 18, 2024
59ae63f
Add files via upload
Mmabiaa Nov 18, 2024
a0d9df3
Update Countries_Details.py
Mmabiaa Nov 18, 2024
f1dd8dd
Add files via upload
Mmabiaa Nov 18, 2024
e207a1b
Add files via upload
Mmabiaa Nov 19, 2024
1a0607b
Update World_Map.py
Mmabiaa Nov 20, 2024
389e7ff
Update mad_lib.py
Mmabiaa Nov 21, 2024
17331b2
Create time_table.py
Mmabiaa Nov 23, 2024
80478db
Add files via upload
Mmabiaa Nov 29, 2024
223154b
Add files via upload
Mmabiaa Nov 30, 2024
4115244
Update sunburst_chart.py
Mmabiaa Nov 30, 2024
e258e5c
Add files via upload
Mmabiaa Dec 1, 2024
8a9021a
Update sunburst_chart.py
Mmabiaa Dec 1, 2024
c1d28a1
Update play_youtube_video.py
Mmabiaa Dec 2, 2024
716a707
Add files via upload
Mmabiaa Dec 3, 2024
9c2e0b9
Create factorial.py
Mmabiaa Dec 4, 2024
edee11e
Update image_mirror.pu
Mmabiaa Dec 7, 2024
95ff43d
Update notifications.py
Mmabiaa Dec 7, 2024
64715d7
Update magic8.py
Mmabiaa Dec 8, 2024
6935d72
Update contact_management.py
Mmabiaa Dec 8, 2024
52ecd29
Add files via upload
Mmabiaa Dec 9, 2024
4f9bc94
Add files via upload
Mmabiaa Dec 26, 2024
720f095
Update 3d_Surface_plot.py
Mmabiaa Dec 26, 2024
e426859
Update 3d_Surface_plot.py
Mmabiaa Dec 26, 2024
d8186ed
Update Animated_Scatter_Plot.py
Mmabiaa Dec 26, 2024
f4355b6
Update qr_code_generator.py
Mmabiaa Dec 26, 2024
eb97f59
Update City_Quiz.py
Mmabiaa Dec 26, 2024
3b397df
Update Currency_Convertor.py
Mmabiaa Dec 26, 2024
fa9ae9c
Update TextMessage_Automation.py
Mmabiaa Dec 26, 2024
91e67ca
Update binary_search.py
Mmabiaa Dec 26, 2024
e589bbb
Update calculator.py
Mmabiaa Dec 26, 2024
bb41c9a
Update contact_management.py
Mmabiaa Dec 26, 2024
5e7627d
Update hangman.py
Mmabiaa Dec 26, 2024
3a17fa7
Update mad_lib.py
Mmabiaa Dec 26, 2024
171d381
Update words_dictionary.py
Mmabiaa Dec 26, 2024
9a4b009
Update right_angle_tringle.py
Mmabiaa Dec 26, 2024
ca06a8c
Update square.py
Mmabiaa Dec 26, 2024
0207de3
Update main.py
Mmabiaa Dec 26, 2024
55c92e6
Update variables.py
Mmabiaa Dec 26, 2024
c649aa3
Update main.py
Mmabiaa Dec 26, 2024
73d377d
Update Calender.py
Mmabiaa Dec 26, 2024
9bc435a
Update Countries_Details.py
Mmabiaa Dec 26, 2024
a05c574
Merge pull request #3 from Mmabiaa/other
Mmabiaa Jan 1, 2025
10d5121
Merge pull request #2 from Mmabiaa/other-1
Mmabiaa Jan 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions Python_Begginer_Projects/Amazing/3d_Surface_plot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D

# Define the range of x and y values
x = np.linspace(-5, 5, 50) # Extending the range for more variation
y = np.linspace(-5, 5, 50)

# Create meshgrid for X and Y
X, Y = np.meshgrid(x, y)

# Calculate Z values for each combination of X and Y
Z = np.sin(np.sqrt(X**2 + Y**2))

# Create the plot
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')

# Plot the surface with color map
surface = ax.plot_surface(X, Y, Z, cmap='viridis')

# Add a colorbar with correct normalization
fig.colorbar(surface, ax=ax, shrink=0.5, aspect=5)

# Set axis labels
ax.set_xlabel('X axis')
ax.set_ylabel('Y axis')
ax.set_zlabel('Z axis')

# Display the plot
plt.show()

# Author - Mmabiaa
21 changes: 21 additions & 0 deletions Python_Begginer_Projects/Amazing/Animated_Scatter_Plot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import plotly.express as px

data = px.data.gapminder()

fig = px.scatter(
data,
x='gdpPercap',
y='lifeExp',
animation_frame='year',
animation_group='country',
size='pop',
color='continent',
hover_name='country',
log_x=True,
size_max=60,
range_x=[200,600],
range_y=[20, 90],
title='Animated Scatter Plot: Life Expectancy vs GDP Per Capita'
)
fig.show()
# Author - Mmabiaa
6 changes: 6 additions & 0 deletions Python_Begginer_Projects/Amazing/Calender.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# A simple calender disply app.
from calendar import TextCalendar
year = int(input('Enter a year: '))
cal = TextCalendar()
print(cal.formatyear(year, 2, 1, 8, 3))
# Author - Mmabiaa
12 changes: 12 additions & 0 deletions Python_Begginer_Projects/Amazing/Cosine_curve_plot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import numpy as np
import matplotlib.pyplot as plt

t = np.arange(0.0,2.0,0.01)
s = 1 + np.cos(2*np.pi*t)

plt.grid()
plt.plot(t,s, '--')
plt.xlabel('Time (t)')
plt.ylabel('Voltage (v)')
plt.title('Cosine Curved plot')
plt.show()
31 changes: 31 additions & 0 deletions Python_Begginer_Projects/Amazing/Countries_Details.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
from countryinfo import CountryInfo
try:
count = input('Enter the name of the country or -1 to quit: ')
while count != '-1':

country = CountryInfo(count)

print("Capital is: ", country.capital())
print('----------------------------------------------------------------')
print('Currency is: ', country.currencies())
print('----------------------------------------------------------------')
print('Language is: ', country.languages())
print('----------------------------------------------------------------')
print('Borders are: ', country.borders())
print('----------------------------------------------------------------')
print('Other names are: ', country.alt_spellings())
print('----------------------------------------------------------------')
print('Population is: ', country.population())
print('----------------------------------------------------------------')
print('Time zone is: ',country.timezones())
print('----------------------------------------------------------------')
count = input('Enter the name of the country or -1 to quit: ')
print('----------------------------------------------------------------')
else:
print('Thanks for using the program...')
except KeyError:
print('Country was not found!')
print('Try Again with a valid country name.')


# Author - Mmabiaa
12 changes: 12 additions & 0 deletions Python_Begginer_Projects/Amazing/Histogram,_plot.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import matplotlib.pyplot as plt

ages = [2, 50, 70, 40,30,50,59,4,84,34,30,30,48,2,7,18,30,34,90,50]

range =(0,100)
bins = 10

plt.hist(ages,bins, range, color='green', histtype='bar', rwidth=0.7)
plt.xlabel('Ages')
plt.ylabel('Bins')
plt.title('Histogram Plot')
plt.show()
17 changes: 17 additions & 0 deletions Python_Begginer_Projects/Amazing/Periodic_Element_Data.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import periodictable

# Prompt the user to input the atomic number
Atomic_Number = int(input('Enter the atomic number of the element: '))

# Use the `periodictable` module to get the element by its atomic number
element = periodictable.elements[Atomic_Number - 1] # Indexing starts at 0, so subtract 1

# Display the element's information
print("Name:", element.name)
print('----------------------')
print("Symbol:", element.symbol)
print('----------------------')
print("Atomic mass:", element.mass)
print('----------------------')
print("Atomic density:", element.density)
print('----------------------')
10 changes: 10 additions & 0 deletions Python_Begginer_Projects/Amazing/Pie_Chart.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import matplotlib.pyplot as plt

labels = ('Python', 'Java', 'JavaScript', 'C++')
sizes =[45, 19, 16, 20]

plt.pie(sizes,
labels=labels, autopct='%1.f%%',
counterclock=False, startangle=105)

plt.show()
8 changes: 8 additions & 0 deletions Python_Begginer_Projects/Amazing/World_Map.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import geopandas as gpd
import matplotlib.pyplot as plt

world = gpd.read_file('Python_Begginer_Projects/Amazing/ne_110m_admin_0_countries.shp')
# main function to display the map
world.plot(edgecolor='red')
plt.title('World Map with Country Borders')
plt.show()
20 changes: 20 additions & 0 deletions Python_Begginer_Projects/Amazing/heart.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import math
from turtle import *

def heart(x):
return 12*math.sin(x) ** 3

def show(x):
return 12 * math.cos(x) - 5 * math.cos(2 * x) - 2 * math.cos(4 * x)

speed(0)
bgcolor('black')

for i in range(10000):
x = heart(i) * 20
y = show(i) * 20
goto(x, y)
for j in range(5):
color('#f73487')
goto(x,0)
done()
10 changes: 10 additions & 0 deletions Python_Begginer_Projects/Amazing/image_mirror.pu
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from PIL import Image


Original_Image = 'pushpa.png'
Image. open(Original_Image)
img = Image.open(Original_Image)
Mirror_Image = img.transpose(Image.FLIP_LEFT_RIGHT)
Mirrored_Image = 'pushpa_mirror.png'
Mirror_Image.save(Mirrored_Image)
Image.open(Mirrored_ Image)
Binary file not shown.
8 changes: 8 additions & 0 deletions Python_Begginer_Projects/Amazing/notifications.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from plyer import notification
# Send notification
notification.notify(
title="Reminder",
message="Take a break and stretch!",
app_name="Python Notifier",
timeout=10
)
9 changes: 9 additions & 0 deletions Python_Begginer_Projects/Amazing/play_youtube_video.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import pywhatkit
try:

Song = input("Enter Song Name: ")
pywhatkit.playonyt (Song)
print("Successfully Played!")

except:
print("An Unexpected Error!")
18 changes: 18 additions & 0 deletions Python_Begginer_Projects/Amazing/sunburst_chart.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import plotly.graph_objects as go

labels = ["Root", "Branch 1","Branch 2", "Leaf 1", "Leaf 2", "Leaf 3"]

parents = ['', "Root","Root", "Branch 1", "Branch 1", "Branch 2"]

values = [10, 5, 5, 2, 3, 5]

fig = go.Figure(go.Sunburst(labels=labels,
parents=parents,
values=values,
branchvalues="total" ))

fig. update_layout(
title="Sunburst Chart in Python",
margin=dict (t=30, l=0, r=0, b=0))

fig. show()
54 changes: 54 additions & 0 deletions Python_Begginer_Projects/Easy/Palindrome.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Palindrome checker Program

def Start(): # A function to start the program
print('----Heyyy, Welcome to the Palindrome Checker----')
print('----------------------------------------------------------------')

while True: # Loop the program until a says no.
choice = input('Do you want to start? (Yes or No): ').lower()

if choice == 'yes':
main()

elif choice == 'no':
print('--------------------------------')
print('Thanks for time...')
break

else:
print('Please enter yes or no')
print()
print('----------------------------------------------------------------')

def accept_word(): # A function to accept user word.
word = input('Enter the word or a number: ')

print('----------------------------------------------------------------')
return word

def Check_Palindrome(word): # A function to check whether a word is a palindrome or not.

if word == word[::-1]: # A condition if the reserved word is same as the actual word.

if word.isdigit():# A condition if the word is a digit for numbers.
print(f'The number "{word}" is a palindrome.')
else:
print(f'The word "{word}" is a palindrome.')

else: # An otherwise condition for word that are not a palindrome.
if word.isdigit():# A condition if the word is a digit for numbers.
print(f'The number "{word}" is not a palindrome.')
else:
print(f'The word "{word}" is not a palindrome.')

print('----------------------------------------------------------------')

def main(): # Main function to take words and check if they are a palindrome or not.

word = accept_word()
print('----------------------------------------------------------------')
Check_Palindrome(word)


if __name__ == '__main__':
Start()
10 changes: 10 additions & 0 deletions Python_Begginer_Projects/Easy/factorial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
number = int(input('Enter a number: '))

def Cal(number):
if(number == 1):
return 1
else:
return number * Cal(number - 1)

a = Cal(number)
print(number, '! =', a)
33 changes: 33 additions & 0 deletions Python_Begginer_Projects/Easy/magic8.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import random

responses = [
"Yes, definitely.",
"As I see it, yes.",
"Reply hazy, try again.",
"Cannot predict now.",
"Do not count on it.",
"My sources say no.",
"Outlook not so good.",
"Very doubtful."
]

def magic_8_ball():
print("Welcome to the Magic 8 Ball! Ask a yes/no question.")

while True:
question = input("Ask your question (or type 'quit' to exit): ")

if question.lower() == 'quit':
print("Thanks for playing! Goodbye!")
break

if question.strip() == "":
print("Please ask a valid question.")
continue

# Get a random response
answer = random.choice(responses)
print("Magic 8 Ball says:", answer)

# Run the program
magic_8_ball()
16 changes: 16 additions & 0 deletions Python_Begginer_Projects/Easy/time_table.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
def calculate():
n = range(1, 13)
for i in n:
print(i, "Times Table")
print('-----------------------------------')
for j in n:
print(i, 'x', j,"=", i*j)
print()

print('-----------------------------------')

def main():

calculate()

main()
22 changes: 22 additions & 0 deletions Python_Begginer_Projects/Intermediate/Calculator/Calculator.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
class calculate:
def __init__(self, first_number, second_number):

self.first_numbeer = first_number
self.second_number = second_number



def add(self):
return self.first_numbeer + self.second_number

def mul(self):
return self.first_numbeer * self.second_number

def sub(self):
return self.first_numbeer - self.second_number

def div(self):
if self.second_number != 0:
return self.first_numbeer / self.second_number
else:
return f'Division by zero is invalid...'
Binary file not shown.
Loading
Loading