-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpython.html
More file actions
216 lines (198 loc) · 6.92 KB
/
Copy pathpython.html
File metadata and controls
216 lines (198 loc) · 6.92 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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CODE WORD</title>
<style>
html, body {
margin: 0;
padding: 0;
height: 100%;
font-family: Arial, sans-serif;
overflow: hidden; /* Prevent body from scrolling */
}
.video-container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
overflow: hidden;
z-index: -1;
}
#video-bg {
position: absolute;
top: 50%;
left: 50%;
min-width: 100%;
min-height: 100%;
width: auto;
height: auto;
transform: translate(-50%, -50%);
background-size: cover;
}
.content {
padding: 20px;
color: white;
position: relative;
z-index: 1;
text-align: center;
height: 100vh; /* Use full viewport height */
overflow-y: auto; /* Enable vertical scrolling */
}
h1 {
font-size: 50px;
}
h2 {
font-size: 30px;
}
p {
font-size: 20px;
line-height: 30px;
margin: 50px 0;
}
hr {
margin: 20px 0;
border-color: white;
}
.code-block {
background-color: #333;
padding: 15px;
border-radius: 5px;
color: #fff;
text-align: left;
font-family: monospace;
}
</style>
</head>
<body>
<div class="video-container">
<video autoplay muted loop id="video-bg">
<source src="webvid.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
</div>
<div class="content">
<img src="img2.png" style="width: 60%; margin: 50px auto 30px auto; display: block;">
<h1>CODE WORD</h1>
<h2>Welcome to the CODE WORD</h2>
<hr>
<div style="text-align: center;">
<a style="padding-right: 20px; color: white; text-decoration: none;" href="index.html">HOME</a>
</div>
<hr>
<p>Hello there! <br>Get ready to start learning Python... </p>
<p>This is going to be awesome....</p>
<hr>
<p>REQUIREMENTS FOR THIS COURSE...</p>
<hr>
<p>1. You must have a laptop.</p>
<p>2. For coding Python or any computer languages in this webpage, you just need an IDE or a COMPILER.</p>
<hr>
<h2>INSTALLING CODING ENVIRONMENT</h2>
<hr>
<p>So first let's install a very famous coding IDE with built-in COMPILER, namely VISUAL STUDIO CODE.</p>
<p>It is not compulsory to use the same...</p>
<p>You can use many like "PYCHARM", "REPLIT", "ATOM", etc...</p>
<p>Let's start to install "VS CODE"...</p>
<p>First go to - <a href="https://code.visualstudio.com/download" target="_blank" style="color: white;">https://code.visualstudio.com/download</a></p>
<p>Then download the latest version of VS CODE for your operating systems.</p>
<hr>
<h2>Getting Started with Python</h2>
<hr>
<p>Now that your environment is set up, let's write our first Python code!</p>
<div class="code-block">
<code>
# This is a comment<br>
print("Hello, World!") # This line prints a message<br>
</code>
</div>
<p>Try running this code in your Python IDE to see the output. It should display: <strong>Hello, World!</strong></p>
<hr>
<h2>Lesson 1: Variables and Data Types</h2>
<hr>
<p>In Python, variables are used to store data. Let's explore how to create variables and use different data types.</p>
<div class="code-block">
<code>
name = "John"<br>
age = 25<br>
is_student = True<br>
height = 5.9<br>
print(f"Name: {name}, Age: {age}, Student: {is_student}, Height: {height}")<br>
</code>
</div>
<p>In the example above, we created variables of different types: <br>
- <strong>String</strong>: name<br>
- <strong>Integer</strong>: age<br>
- <strong>Boolean</strong>: is_student<br>
- <strong>Float</strong>: height<br>
</p>
<hr>
<h2>Lesson 2: Conditional Statements</h2>
<hr>
<p>Conditional statements allow us to control the flow of the program based on conditions.</p>
<div class="code-block">
<code>
age = 18<br>
if age >= 18:<br>
 print("You are eligible to vote.")<br>
else:<br>
 print("You are not eligible to vote.")<br>
</code>
</div>
<hr>
<h2>Interactive Coding</h2>
<hr>
<p>If you'd like to practice coding online, visit this Python compiler: <a href="https://replit.com/~" target="_blank" style="color: white;">REPLIT</a> to run and modify your code in real-time!</p>
<hr>
<h2>Further Learning Resources</h2>
<hr>
<p>Here are some additional resources to help you continue learning Python:</p>
<ul>
<li><a href="https://docs.python.org/3/" target="_blank" style="color: white;">Official Python Documentation</a></li>
<li><a href="https://www.w3schools.com/python/" target="_blank" style="color: white;">W3Schools Python Tutorial</a></li>
<li><a href="https://realpython.com/" target="_blank" style="color: white;">Real Python</a></li>
</ul>
</div>
<!-- Scroll to Top Button -->
<button onclick="scrollToTop()" id="scrollBtn" title="Go to top">↑</button>
<script>
// Scroll to top function
function scrollToTop() {
window.scrollTo({top: 0, behavior: 'smooth'});
}
// Show the button when the user scrolls down
window.onscroll = function() {scrollFunction()};
function scrollFunction() {
let scrollBtn = document.getElementById("scrollBtn");
if (document.body.scrollTop > 200 || document.documentElement.scrollTop > 200) {
scrollBtn.style.display = "block";
} else {
scrollBtn.style.display = "none";
}
}
</script>
<style>
/* Scroll to top button styling */
#scrollBtn {
display: none; /* Hidden by default */
position: fixed;
bottom: 20px;
right: 30px;
z-index: 99;
font-size: 18px;
border: none;
outline: none;
background-color: #333;
color: white;
cursor: pointer;
padding: 10px 15px;
border-radius: 5px;
}
#scrollBtn:hover {
background-color: #555;
}
</style>
</body>
</html>