python mini projects list
Here is a list of interesting python projects
1.odd even finder
x=int(input("first num"))
y=int(input("second num"))
sum=x+y
print(sum)
r=sum%2
if r==0:print("even ")
else:print("it is not"
2.get source code
import requests
def get_source_code(url):
try:
response = requests.get(url)
response.raise_for_status() # Raise an exception for 4xx or 5xx status codes
return response.text
except requests.RequestException as e:
return f"Error: {e}"
url = input("https://www.xyz.com: ")
source_code = get_source_code(url)
print("Source Code:")
print(source_code)
3. password finder
print("\033[2;32;40m Bright Green \n")
pas=int(input("write.pass"))
i=1
while i<=pas :
print(i)
i+=1
print("your password is",pas)
Tags:
python mini projects