Web Development CS JS Python JavaScript Hacking ReactJs Python django Flask CSS Frontend Backend Full Stack Java Node Pdf Books
3.99K subscribers
878 photos
11 videos
995 files
354 links
One place for the latest in JavaScript, Python, Django, React, and more. Get top-notch tutorials, tips, and downloadable resources. Join us to elevate your tech skills!
Download Telegram
Undefined.

This is due to hoisting. The code behaves like this πŸ‘‡

var a; //the variable got hoisted
console.log(a); // Outputs: undefined
a = 5;

[We know when a declare a variable the initial value is "undefined" until we assign a value]
πŸ‘1
Answer: Exception

Solution:
class TV:
pass
creates a new data type called TV.

pass is just a no-operation statement, it doesn't add any data or functionality to the class.

Hence, this data type does not contain any attributes or functionality

obj = TV()
creates a new object named obj, of the data type TV.

obj.price = 200
creates a new variable named price, within obj.
The value of this variable is set to 200.

Finally, we have
print(self.price)

But there is no object named self here!

Hence, we get an Exception stating that there is nothing called self.

But you'd have seen self in other programs elsewhere.

self is not a keyword or pre-defined variable in Python.

It is simply a convention to use self WITHIN methods to denote

the first parameter of the method.

The first parameter of a method is is the object through which the method was invoked.

Eg.
a = [1,2,3]
then
a.append(5)
is equivalent to
list.append(a, 5)

So here, a is implicitly passed to the method append.

The name self is

conventionally used to refer to the implicit argument passed in methods.

Otherwise, the word self has no special meaning in Python.

Hence, the code in the question gives an error, because self is not defined before use.

I hope this helped!

@python_assets
@javascript_resources
❀4πŸ‘2
Practice these 125+ Algorithms in
@javascript_resources
@python_assets
❍ C++
❍ Java
❍ Python
❍ JavaScript
Or, any language of your choice

Stay in top 5% of programmers.
⇩
➊ Array - Algorithms

βž€ Creating an Array
➁ Iterate through Array
βž‚ Get an Element
βžƒ Search an Element
βž„ Insert Element(s)
βž… Delete Element(s)
βž† Filter an Array
βž‡ Fetch a Sub-Array
➈ Merging Arrays
βž‰ Reverse Array
βž€βž€ Rotate Array
βž‹ Linked List - Algorithms [1]

βž€ Creating a Linked List
➁ Iterate through Linked List
βž‚ Get an Element
βžƒ Find an Element

➀ Insert Element(s)
βž„ At Start
βž… At End
βž† At Anywhere
βž‹ Linked List - Algorithms [2]

➀ Delete Element(s)
βž‡ From Start
➈ From End
βž‰ From Anywhere

βž€βž€ IsEmpty
βž€βž Merging Linked Lists
βž€βž‚ Reverse Linked List
βž€βžƒ Check for Cycles
➌ Stack - Algorithms

βž€ Push
➁ Pop
βž‚ IsEmpty
βžƒ IsFull
βž„ Peek

➍ Queue - Algorithms

βž€ Enqueue
➁ Dequeue
βž‚ IsEmpty
βžƒ IsFull
βž„ Peek
➎ Hash Table - Algorithms

➀ Hash Function
βž€ Division Method
➁ Multiplication Method
βž‚ Universal Hashing
➀ Hash Collision
βžƒ Collision Resolution
➀ Open Addressing
βž„ Linear Probing
βž… Quadratic Probing
βž† Double Hashing
➏ Tree - Algorithms

βž€ Traversal
➁ Height of a Node/Tree
βž‚ Depth of a Node
βžƒ Degree of a Node
➀ Traversal
βž„ In Order
βž… Pre Order
βž† Post Order
βž‡ Level Order
➈ Insert
βž‰ Delete
➐ Heap - Algorithms
@javascript_resources
@python_assets
βž€ Heapify
➁ Insert Element
βž‚ Delete Element
βžƒ Peek (Max/Min Element)
βž„ Extract (Max/Min Element)
βž‘ Graph - Algorithms [1]

➀ Adjacency Matrix
βž€ Add Edge
➁ Remove Edge

➀ Adjacency List
βž‚ Add Edge
βžƒ Remove Edge

➀ Traverse Nodes
βž„ Depth First Search
βž… Breadth First Search
βž‘ Graph - Algorithms [2]

➀ Shortest Path
βž† Dijkstra's Algorithm
βž‡ Floyd-Warshall Algorithm
➈ Bellman Ford Algorithm

➀ Minimum Spanning Tree
βž‰ Kruskal's Algorithm
βž€βž€ Prim's Algorithm
βž‘ Graph - Algorithms [3]

➀ Connectivity
βž€βž Check connectivity b/w nodes
βž€βž‚ Find all paths
βž€βžƒ Articulation points
βž€βž„ Bridges
βž€βž… Hamiltonian Path
βž€βž† Hamiltonian Cycle
βž€βž‡ Eulerian Path
βž€βžˆ Eulerian Cycle
20. Find # of islands
βžβž€ Transitive Closure
βž‘ Graph - Algorithms [4]
@javascript_resources
@python_assets
➁➁ Graph Cycle

➀ Topological Sorting
βžβž‚ Find all topological sorting
βžβžƒ Kahn's Algorithm
βžβž„ Longest Path

➀ Flow Network
βžβž… Ford-Fulkerson Algorithm
βžβž† Edmonds–Karp algorithm
βžβž‡ Dinic's Algorithm
βž’ Search Algorithms

βž€ Linear Search
➁ Jump Search
βž‚ Binary Search
βžƒ Interpolation Search
βž„ Exponential Search
βž… Ternary Search
βž“ Sorting Algorithms [1]

βž€ Bubble Sort
➁ Selection Sort
βž‚ Insertion Sort
βžƒ Merge Sort
βž„ Quick Sort

And, a few advanced ones,

βž… Binary Insertion Sort
βž† 3-way Merge Sort
βž‡ 3-way Quick Sort
➈ Counting Sort
βž‰ Radix Sort
βž€βž€ Bucket Sort
βž€βž Heap Sort
βž€βž‚ Shell Sort
βž“ Sorting Algorithms [2]

βž€βžƒ Tim Sort
βž€βž„ Odd-Even Sort
βž€βž… Comb Sort
βž€βž† Cocktail Sort
βž€βž‡ Tree Sort
βž€βžˆ Cartesian Sort
20. Pigeonhole Sort
βžβž€ Cycle Sort
➁➁ Strand Sort
βžβž‚ Pancake Sort
βžβžƒ Permutation Sort
βžβž„ Gnome Sort
βžβž… Bitonic Sort
βžβž† Sleep Sort
@javascript_resources
@python_assets
πŸ‘2❀1πŸ”₯1😁1
Ten useful websites which can replace your Paid PC software (100% FREE)

1. Landingsite:

Build a website in a 60 seconds:

- Home Page Generation & Editing
- 150M+ Stock Photos
- Free Subdomain and Built-In SEO
- Traffic Analytics

landingsite.ai

Follow us on Telegram – https://t.me/javascript_resources
https://t.me/python_assets
2. Ezgif

Ezgif can do many things for you:

β€’ Video to GIF
β€’ Image converter
β€’ Image optimizer
β€’ Editing tools like resize, rotate, crop, cut, and split

Try now:
Ezgif.com

3. RemoveBG

RemoveBG easily removes image backgrounds with just a few clicks.

Try now:
remove.bg

Follow us on Telegram – https://t.me/javascript_resources
https://t.me/python_assets
4. Photopea

Photopea is a free web-based editor that replaces Adobe Photoshop and Illustrator.

Edit images, create illustrations, design for the web, or convert image formats.

Try now:
photopea.com
https://photopea.com
5. Nero AI:

Enlarge, improve, and clean up photos without quality loss.

Increase image resolution with this tool.

Try now: ai.nero.com/image-upscaler


6. Stockimg:

stockimgAI is a free tool for creating logos, stock images, wallpapers, and more in seconds.

Try it now: stockimg.ai

7. TinyWow:

Free AI Writing, PDF, image, and video editing tools.

Completely free with OCR, no registration needed.

Try now:
tinywow.com

8. VirusTotal:

Free online virus checker. Analyze files, domains, IPs, and URLs for malware.

Try now: virustotal.com/gui/home/upload

9. Synthesia AI

Use Synthesia AI to create professional videos from text in over 65 languages, saving you time and money.

Try it now at . synthesia.io


10. PDF Escape:

Best Adobe Acrobat alternative.

Edit, fill, view PDFs online with PDFescape.

Try now at . pdfescape.com



Follow us on Telegram – https://t.me/javascript_resources
https://t.me/python_assets
❀4πŸ”₯2πŸ‘1
Atleast give some reaction on posts... πŸ˜’πŸ˜’ Not begging for money πŸ’°
πŸ‘9πŸ‘4πŸ”₯1πŸ₯°1
Web Development CS JS Python JavaScript Hacking ReactJs Python django Flask CSS Frontend Backend Full Stack Java Node Pdf Books pinned Β«For questions here is the Chat group link https://t.me/+2KE896TMwHkxOWE1 For Resources aka PDfs and Ebooks group link https://t.me/+eweUkdFwlho4YjRl Join Python Channel https://t.me/python_assetsΒ»