What will be the value of the following Python expression?
bin(10-2)+bin(12^4)
  bin(10-2)+bin(12^4)
Anonymous Quiz
    15%
    0b10000
      
    37%
    0b10001000
      
    32%
    0b1000b1000
      
    16%
    0b10000b1000
      
    Object in Python π
Just look around, everything you see can be treated as an object.
For instance a Car, Dog, your Laptop are all objects.
An Object can be defined using 2 things:
- Properties: that describe an object
- Behaviour: the functions that an object can perform
...β¬οΈ
For example, a Car is an object that has properties such as color & model, and behaviours such as accelerating, braking & turning.
But, how do we create these objectsβπ€
Just look around, everything you see can be treated as an object.
For instance a Car, Dog, your Laptop are all objects.
An Object can be defined using 2 things:
- Properties: that describe an object
- Behaviour: the functions that an object can perform
...β¬οΈ
For example, a Car is an object that has properties such as color & model, and behaviours such as accelerating, braking & turning.
But, how do we create these objectsβπ€
π2
  Which of the following expressions can be used to multiply a given number βaβ by 4?
  Anonymous Quiz
    20%
    a<<2
      
    39%
    a<<4
      
    13%
    a>>2
      
    28%
    a>>4
      
    What will be the output of the following Python code if a=10 and b =20?
  Anonymous Quiz
    51%
    10 20
      
    10%
    10 10
      
    22%
    20 10
      
    17%
    20 20
      
    π4
  Inheritance in Python πͺ’
check this out --------------------βοΈ
Let's say we want to create an Electric car & don't want to define all the properties and methods of the basic Car class.
Inheritance helps us to inherit all the properties/methods of parent class & add new ones or override existing.
  check this out --------------------βοΈ
Let's say we want to create an Electric car & don't want to define all the properties and methods of the basic Car class.
Inheritance helps us to inherit all the properties/methods of parent class & add new ones or override existing.
What is the twoβs complement of -44?
  Anonymous Quiz
    19%
    1011011
      
    48%
    11010100
      
    21%
    11101011
      
    12%
    10110011
      
    What will be the output of the following Python expression?
~100?
  ~100?
Anonymous Quiz
    21%
    101
      
    27%
    -101
      
    31%
    100
      
    21%
    -100
      
    π₯4
  Abstraction in Python π
Here's an example -------------------βοΈ
This concept focuses on exposing only essential information to the outside world while hiding implementation details.
We use abstract classes and methods to define a common interface.
At this point if Abstraction and Encapsulation confuse you! π
Abstraction conceals the implementation details, but doesn't hide the data itself.
On the other hand, Encapsulation hides the data and restricts unwanted use from external sources.
Here's an example -------------------βοΈ
This concept focuses on exposing only essential information to the outside world while hiding implementation details.
We use abstract classes and methods to define a common interface.
At this point if Abstraction and Encapsulation confuse you! π
Abstraction conceals the implementation details, but doesn't hide the data itself.
On the other hand, Encapsulation hides the data and restricts unwanted use from external sources.
π7
  What will be the output of the following Python code snippet?
['hello', 'morning'][bool('')]
  ['hello', 'morning'][bool('')]
Anonymous Quiz
    31%
    error
      
    46%
    no output
      
    18%
    hello
      
    4%
    morning
      
    What will be the output of the following Python code?
  Anonymous Quiz
    34%
    Error
      
    23%
    [1, 0, 2, 0, βhelloβ, β, []]
      
    9%
    [1, 0, 2, βhelloβ, β, []]
      
    34%
    [1, 2, βhelloβ]
      
    π4π1
  What will be the output of the following Python code?
  Anonymous Quiz
    24%
    pass
      
    55%
    true
      
    12%
    false
      
    10%
    error
      
    π 9 must-have Python developer tools.
1. PyCharm IDE
2. Jupyter notebook
3. Keras
4. Pip Package
5. Python Anywhere
6. Scikit-Learn
7. Sphinx
8. Selenium
9. Sublime Text
1. PyCharm IDE
2. Jupyter notebook
3. Keras
4. Pip Package
5. Python Anywhere
6. Scikit-Learn
7. Sphinx
8. Selenium
9. Sublime Text
π6π2β€1
  What will be the output of the following Python code?
  Anonymous Quiz
    17%
    error
      
    12%
    hello
      
    52%
    good
      
    19%
    bad
      
    π2
  71 Python projects with source code .pdf
    42 KB
  71 Python projects with source code