Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
144 lines (123 loc) · 3.04 KB
/
Copy pathindex.html
File metadata and controls
144 lines (123 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Python Online Course</title>
<style>
body {
font-family: Arial, sans-serif;
background: #eef3ff;
margin: 0;
padding: 0;
}
header {
background: #1a1a3b;
color: white;
padding: 25px;
text-align: center;
font-size: 30px;
font-weight: bold;
}
.container {
width: 90%;
max-width: 900px;
margin: 30px auto;
}
.lesson {
background: white;
padding: 20px;
margin-bottom: 20px;
border-radius: 12px;
box-shadow: 0 4px 10px rgba(0,0,0,0.1);
border-left: 5px solid #4b7bec;
}
.lesson h2 {
margin: 0;
font-size: 24px;
color: #2c3e50;
}
pre {
background: #f5f5f5;
padding: 12px;
border-radius: 8px;
overflow-x: auto;
margin-top: 10px;
}
</style>
</head>
<body>
<header>Python Online Course</header>
<div class="container">
<div class="lesson">
<h2>Lesson 1: What is Python?</h2>
<p>Python is a powerful, easy-to-learn programming language used in apps, AI, games, data science, automation, websites, and more.</p>
<pre>print("Hello, Python!")</pre>
</div>
<div class="lesson">
<h2>Lesson 2: Variables</h2>
<p>Variables store data. Python creates them automatically when you assign values.</p>
<pre>x = 10
name = "Alex"
pi = 3.14</pre>
</div>
<div class="lesson">
<h2>Lesson 3: Data Types</h2>
<p>Common Python data types:</p>
<ul>
<li>String ? "Hello"</li>
<li>Integer ? 5</li>
<li>Float ? 5.8</li>
<li>Boolean ? True / False</li>
<li>List ? [1, 2, 3]</li>
<li>Tuple ? (1, 2, 3)</li>
<li>Dictionary ? {"name": "Alex"}</li>
</ul>
</div>
<div class="lesson">
<h2>Lesson 4: If Statements</h2>
<p>If statements make decisions in programs.</p>
<pre>age = 18
if age >= 18:
print("Adult")
else:
print("Minor")</pre>
</div>
<div class="lesson">
<h2>Lesson 5: Loops</h2>
<p>Loops repeat code multiple times.</p>
<pre>for i in range(5):
print(i)
x = 0
while x < 5:
print(x)
x += 1</pre>
</div>
<div class="lesson">
<h2>Lesson 6: Functions</h2>
<p>Functions are reusable blocks of code.</p>
<pre>def greet(name):
print("Hello", name)
greet("Alex")</pre>
</div>
<div class="lesson">
<h2>Lesson 7: Lists</h2>
<pre>fruits = ["apple", "banana", "orange"]
print(fruits[0])</pre>
</div>
<div class="lesson">
<h2>Lesson 8: Dictionaries</h2>
<pre>person = {"name": "Alex", "age": 15}
print(person["name"])</pre>
</div>
<div class="lesson">
<h2>Lesson 9: Classes (OOP)</h2>
<pre>class Dog:
def __init__(self, name):
self.name = name
mydog = Dog("Buddy")
print(mydog.name)</pre>
</div>
</div>
</body>
</html>