Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 79e07f1

Browse files
committed
4th Update
1 parent 866b04b commit 79e07f1

File tree

5 files changed

+135
-85
lines changed

5 files changed

+135
-85
lines changed

‎bichi.py

Whitespace-only changes.

‎index.html

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@
3030
<ul type="none" class="nav-hidden">
3131
<li>
3232
<img src="images/arrow.png" alt="" class="arrow-img" />
33-
<a href="./lesson-2/index.html">
33+
<a href="index.html">
3434
<span class="lesson">Lesson 1 / Intro</span>
3535
</a>
3636
</li>
3737
<hr class="two" />
3838
<li>
3939
<img src="images/arrow.png" alt="" class="arrow-img" />
40-
<a href="https://youtube.com">
40+
<a href="./lesson-2/index.html">
4141
<span class="lesson">Lesson 2 / Revision</span>
4242
</a>
4343
</li>
@@ -151,13 +151,14 @@ <h1 class="h1">
151151
<h1 class="h1">This Is Introduction To DSA Using Python</h1>
152152
<center>
153153
<div class="video-container">
154-
<iframe width="560" height="315" src="https://www.youtube.com/embed/RQKJB7z-OqU" title="YouTube video player"
155-
frameborder="0"
156-
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
157-
allowfullscreen></iframe>
154+
<iframe width="560" height="315" src="https://www.youtube.com/embed/RQKJB7z-OqU" title="YouTube video player"
155+
frameborder="0"
156+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
157+
allowfullscreen></iframe>
158158
</div>
159159
<div id="box">
160-
<span>Full PlayList</span>
160+
<a style="color: chartreuse;" href="https://www.youtube.com/watch?v=RQKJB7z-OqU&list=PLGxMeslbGNsU38f0599lOC-cRmrf01lD3&pp=iAQB"><span>Full
161+
PlayList</span></a>
161162
</div>
162163
</center>
163164
<hr class="one" />

‎lesson-2/index.html

Lines changed: 103 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<hr class="two" />
3939
<li>
4040
<img src="../images/arrow.png" alt="" class="arrow-img" />
41-
<a href="https://youtube.com">
41+
<a href="index.html">
4242
<span class="lesson">Lesson 2 / Revision</span>
4343
</a>
4444
</li>
@@ -151,14 +151,15 @@ <h1 class="h1">
151151
<hr class="one" />
152152
<h1 class="h1">This Is A Quick Revision Of Python For This Course</h1>
153153
<div class="video-container">
154-
<iframe width="560" height="315" src="https://www.youtube.com/embed/RQKJB7z-OqU" title="YouTube video player"
154+
<iframe width="560" height="315" src="https://www.youtube.com/embed/EaUnN9SZmy8" title="YouTube video player"
155155
frameborder="0"
156156
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
157157
allowfullscreen></iframe>
158158
</div>
159159
<center>
160160
<div id="box">
161-
<span>Full PlayList</span>
161+
<a style="color: chartreuse;" href="https://www.youtube.com/watch?v=RQKJB7z-OqU&list=PLGxMeslbGNsU38f0599lOC-cRmrf01lD3&pp=iAQB"><span>Full
162+
PlayList</span></a>
162163
</div>
163164
</center>
164165
<hr class="one" />
@@ -242,32 +243,12 @@ <h1 class="h1">This Is A Quick Revision Of Python For This Course</h1>
242243
tutorials, and documentation to support learning and mastering DSA using Python.
243244
</p>
244245
<hr class="one" />
245-
<h1 class="story">Data Structures In Python</h1>
246+
<h1 class="story">First Python Program</h1>
246247
<hr class="two" />
247-
<!-- <center>
248-
<p class="p" style="color: aqua !important">
249-
Now look at this picture very carefully...
250-
</p>
251-
</center>
252-
<div class="div-img">
253-
<img class="img" src="../images/dgm-2.png" alt="" />
254-
</div>
255-
<center>
256-
<p class="p" style="color: aqua !important">
257-
This is the solution for the problem...
258-
</p>
259-
</center>
260-
<div class="div-img">
261-
<img class="img" src="../images/dgm-3.png" alt="" />
262-
</div> -->
263248
<div class="container main-body-2">
264249
<pre class="left-2">
265250
<code id="code-block" class="python">
266-
# Your Python code here
267-
def greet():
268251
print("Hello, World!")
269-
270-
greet()
271252
</code>
272253
</pre>
273254

@@ -278,48 +259,105 @@ <h1 class="story">Data Structures In Python</h1>
278259

279260
<hr class="one" />
280261
<h1 class="h1">
281-
Some Very Popular Data Structures In Different Programming Languages
262+
Variables In Python
282263
</h1>
283-
<div id="table">
284-
<table>
285-
<thead>
286-
<th>Data Structure</th>
287-
<th>Python</th>
288-
<th>Java</th>
289-
<th>C++</th>
290-
</thead>
291-
<tbody>
292-
<tr>
293-
<td>Array</td>
294-
<td>Lists</td>
295-
<td>
296-
Native Array
297-
<br />
298-
ArrayList
299-
</td>
300-
<td>
301-
Native Array
302-
<br />
303-
std::vector
304-
</td>
305-
</tr>
306-
<tr>
307-
<td>Hash Table</td>
308-
<td>Dictionary</td>
309-
<td>
310-
HashMap <br />
311-
LinkedHashMap
312-
</td>
313-
<td>std::map</td>
314-
</tr>
315-
<tr>
316-
<td>Linked List</td>
317-
<td>Not Available</td>
318-
<td>LinkedList</td>
319-
<td>std::list</td>
320-
</tr>
321-
</tbody>
322-
</table>
264+
<hr class="two" />
265+
<p class="p" style="color: aqua !important">Variables are the name , given to a particular memory location. We've
266+
to follow some rule to declare a variable names in Python . Those are :-</p>
267+
<h1 class="story">Do This</h1>
268+
<span class="do" style="color: chartreuse; font-family: cursive; font-size: 20px; padding-left: 100px;">1) Starts
269+
with only A-Z / a-z/ _ .</span>
270+
<br />
271+
<span class="do" style="color: chartreuse; font-family: cursive; font-size: 20px; padding-left: 100px;">2) Can
272+
contain number in the middle.</span>
273+
<h1 class="story">Don't Do This</h1>
274+
<span class="do" style="color: #ff002b; font-family: cursive; font-size: 20px; padding-left: 100px;">1) Doesn't
275+
starts with any number (0-9).</span>
276+
<br />
277+
<span class="do" style="color: #ff002b; font-family: cursive; font-size: 20px; padding-left: 100px;">2) Some
278+
system variables starts with (_) , so we'll avoid that.</span>
279+
<p class="p">As Python is a Dynamically Typed programming language , we don't need to mention the data type of the
280+
variable . This will automatically detect that .</p>
281+
<hr class="one" />
282+
<h1 class="h1">
283+
Data Types In Python
284+
</h1>
285+
<hr class="two" />
286+
<p class="p">We've some by default data-types in Python like,-</p>
287+
<span class="dos" style="color: #ff002b; font-family: cursive; font-size: 20px; padding-left: 100px;">1)
288+
Integer</span>
289+
<span class="dos" style="color: #ff002b; font-family: cursive; font-size: 20px; padding-left: 100px;">2)
290+
Float</span>
291+
<span class="dos" style="color: #ff002b; font-family: cursive; font-size: 20px; padding-left: 100px;">3)
292+
Strings</span>
293+
<span class="dos" style="color: #ff002b; font-family: cursive; font-size: 20px; padding-left: 100px;">4)
294+
Arrays</span>
295+
<p class="p">To know a data-type of a variable , we can use <span style="color: greenyellow;">type()</span>
296+
function .</p>
297+
<hr class="one" />
298+
<h1 class="h1">Arithmetical Operators</h1>
299+
<hr class="two" />
300+
<p class="p">In Python we've some Arithmetical Operators ,-</p>
301+
<span class="dos" style="color: #ff002b; font-family: cursive; font-size: 20px; padding-left: 100px;">1)
302+
<b style="color: chartreuse;">[+]</b>
303+
To add two integers / floats / strings</span>
304+
<br />
305+
<span class="dos" style="color: #ff002b; font-family: cursive; font-size: 20px; padding-left: 100px;">1)
306+
<b style="color: chartreuse;">[-]</b>
307+
To subtract two integers / floats</span>
308+
<br />
309+
<span class="dos" style="color: #ff002b; font-family: cursive; font-size: 20px; padding-left: 100px;">1)
310+
<b style="color: chartreuse;">[*]</b>
311+
To multiply two integers / floats</span>
312+
<br />
313+
<span class="dos" style="color: #ff002b; font-family: cursive; font-size: 20px; padding-left: 100px;">1)
314+
<b style="color: chartreuse;">[/]</b>
315+
To divide two integers / floats</span>
316+
<br />
317+
<span class="dos" style="color: #ff002b; font-family: cursive; font-size: 20px; padding-left: 100px;">1)
318+
<b style="color: chartreuse;">[**]</b>
319+
To power two integers / floats</span>
320+
<br />
321+
<span class="dos" style="color: #ff002b; font-family: cursive; font-size: 20px; padding-left: 100px;">1)
322+
<b style="color: chartreuse;">[//]</b>
323+
To floor division two integers / floats</span>
324+
<hr class="one" />
325+
<h1 class="h1">Taking Inputs</h1>
326+
<hr class="two" />
327+
<p class="p">We've to use <span style="color: chartreuse;">input()</span> function to take inputs , from the users
328+
. By default the <span style="color: chartreuse;">input()</span> function stores the user input in string
329+
data-type format .</p>
330+
<div class="container main-body-2">
331+
<pre class="left-2">
332+
<code id="code-block" class="python">
333+
def add():
334+
input1 = input("Enter Your first Number : ")
335+
input2 = input("Enter Your second Number : ")
336+
337+
output = input1 + input2
338+
print("The result is " + output)
339+
340+
add()
341+
</code>
342+
</pre>
343+
</div>
344+
<hr class="two" />
345+
<p class="p">This code will store your numbers as string data-type , so it will not add your numbers . But if you
346+
want to add them , you've to convert the data-type to string(str) to integer(int) . Let see how we can do that,-
347+
</p>
348+
<div class="container main-body-2">
349+
<pre class="left-2">
350+
<code id="code-block" class="python">
351+
def add():
352+
input1 = int(input("Enter Your first Number : "))
353+
input2 = int(input("Enter Your second Number : "))
354+
355+
output = input1 + input2
356+
print("The result is " + output)
357+
358+
add()
359+
</code>
360+
</pre>
323361
</div>
324362
</div>
325363
</div>
@@ -329,11 +367,6 @@ <h1 class="h1">
329367
</footer>
330368
<script src="script.js"></script>
331369
<script src="https://cdn.jsdelivr.net/npm/prismjs@1.24.1/prism.min.js"></script>
332-
<!-- <script>
333-
// Initialize Prism.js
334-
Prism.highlightAll();
335-
</script> -->
336-
337370
</body>
338371

339372
</html>

‎lesson-2/script.js

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,22 @@ document.addEventListener("DOMContentLoaded", function () {
2727
// Initialize Prism.js
2828
Prism.highlightAll();
2929

30-
function copyCode() {
30+
// function showNotification(message, type) {
31+
// // You can implement your custom notification here
32+
// // This is just a basic example
33+
// alert(`${type}: ${message}`);
34+
// }
35+
36+
function copyCode() {
3137
const codeBlock = document.getElementById("code-block");
3238
navigator.clipboard.writeText(codeBlock.innerText)
33-
.then(() => {
34-
showNotification("Code Copied !!", "success");
35-
})
36-
.catch((error) => {
37-
console.error("Failed To Copy: ",error);
38-
});
39-
}
39+
.then(() => {
40+
showNotification("Code Copied !!", "success");
41+
})
42+
.catch((error) => {
43+
showNotification("Failed To Copy: "+error,"error");
44+
});
45+
}
4046

4147
function showNotification(message, type) {
4248
const notification = document.getElementById("notification");

‎style.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,4 +395,14 @@ footer {
395395
padding-left: 20px;
396396
padding-right: 20px;
397397
}
398+
399+
.do {
400+
padding-left: 20px !important;
401+
padding-right: 0px !important;
402+
}
403+
404+
.dos {
405+
padding-left: 20px !important;
406+
padding-right: 0px !important;
407+
}
398408
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /