-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproject1.py
More file actions
96 lines (72 loc) · 3.04 KB
/
project1.py
File metadata and controls
96 lines (72 loc) · 3.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
import streamlit as st
from datetime import datetime
st.set_page_config(page_title="My Python Application", layout="centered")
st.markdown("## ====================================")
st.markdown("### Welcome to my Application! ")
st.markdown("## ====================================")
name = st.text_input("Please enter your name:")
if name:
current_time = datetime.now()
formatted_time = current_time.strftime("%d %B %Y, %I:%M %p")
st.markdown("---")
st.subheader("USER DETAILS")
st.write(f"**Hello, {name}!**")
st.write(f"**Current Date and Time:** {formatted_time}")
if st.button("Continue"):
st.markdown("""
---
## 🧠 PYTHON FEATURE: EXTENSIVE LIBRARIES
---
### 1️⃣ INTRODUCTION TO LIBRARIES
A library is a collection of pre-written code that helps programmers
perform common tasks without writing code from scratch.
Python has over **450,000+ packages** on the Python Package Index (PyPI),
covering almost every field — AI, data analysis, automation, and web development.
---
### 2️⃣ LIBRARIES USED IN ARTIFICIAL INTELLIGENCE & MACHINE LEARNING
- **TensorFlow** → Deep learning (Google)
- **Keras** → User-friendly, built on TensorFlow
- **Scikit-learn** → Regression, clustering, classification
- **PyTorch** → Research & AI labs (Meta)
```python
from sklearn.linear_model import LinearRegression
model = LinearRegression()
model.fit([[1],[2],[3]], [2,4,6])
print(model.predict([[4]]))
```
---
### 3️⃣ LIBRARIES USED IN WEB DEVELOPMENT
- **Flask** → Lightweight web framework
- **Django** → Full-stack framework used by platforms like Instagram
```python
from flask import Flask
app = Flask(__name__)
@app.route('/')
def home():
return "Hello, World!"
app.run()
```
---
### 4️⃣ LIBRARIES USED IN UI & DESKTOP APPLICATIONS
- **Tkinter** → Built-in GUI library
- **PyQt** → Professional desktop apps
- **Kivy** → Cross-platform apps (desktop + mobile)
---
### 5️⃣ PROS AND CONS OF PYTHON LIBRARIES
**Advantages:**
- Saves time using ready-made code
- Reduces errors & improves efficiency
- Huge community support
- Enables complex tasks with fewer lines
**Limitations:**
- Too many libraries can confuse beginners
- Some require manual installation
- Heavy libraries can slow small projects
---
### 🎯 CONCLUSION
Python libraries make programming easier, faster, and more powerful.
They let developers focus on **logic and creativity** instead of rewriting basic features.
This is one of the main reasons **Python remains one of the world’s most popular languages.**
---
""")
st.success("✅ Thank you for visiting!")