100+ Basic To Advance Python Programmes π
Don't Forget to give reactionsβ€οΈ
β€5π₯1
Python Interview Questions β Part 1
1. What is Python?
Python is a high-level, interpreted programming language known for its readability and wide range of libraries.
2. Is Python statically typed or dynamically typed?
Dynamically typed. You don't need to declare data types explicitly.
3. What is the difference between a list and a tuple?
List is mutable, can be modified.
Tuple is immutable, cannot be changed after creation.
4. What is indentation in Python?
Indentation is used to define blocks of code. Python strictly relies on indentation instead of brackets {}.
5. What is the output of this code?
x = [1, 2, 3]
print(x * 2)
Answer: [1, 2, 3, 1, 2, 3]
6. Write a Python program to check if a number is even or odd.
num = int(input("Enter number: "))
if num % 2 == 0:
print("Even")
else:
print("Odd")
7. What is a Python dictionary?
A collection of key-value pairs. Example:
person = {"name": "Alice", "age": 25}
8. Write a function to return the square of a number.
def square(n):
return n * n
ENJOY LEARNING ππ
1. What is Python?
Python is a high-level, interpreted programming language known for its readability and wide range of libraries.
2. Is Python statically typed or dynamically typed?
Dynamically typed. You don't need to declare data types explicitly.
3. What is the difference between a list and a tuple?
List is mutable, can be modified.
Tuple is immutable, cannot be changed after creation.
4. What is indentation in Python?
Indentation is used to define blocks of code. Python strictly relies on indentation instead of brackets {}.
5. What is the output of this code?
x = [1, 2, 3]
print(x * 2)
Answer: [1, 2, 3, 1, 2, 3]
6. Write a Python program to check if a number is even or odd.
num = int(input("Enter number: "))
if num % 2 == 0:
print("Even")
else:
print("Odd")
7. What is a Python dictionary?
A collection of key-value pairs. Example:
person = {"name": "Alice", "age": 25}
8. Write a function to return the square of a number.
def square(n):
return n * n
ENJOY LEARNING ππ
Do not forget to React β€οΈ to this Message for More Content Like this
Thanks For Joining All β€οΈβ€4π₯°1
What is the default return value of a function in Python if there is no return statement?
Anonymous Quiz
10%
False
28%
null
18%
0
43%
None
β€4π2
Boost your python speed by 300% π
Don't Forget to give reactionsβ€οΈ
β€3π₯°1
DATA STRUCTURES IN PYTHON.pdf
3.9 MB
Data Structures In Python π
Do not forget to React β€οΈ to this Message for More Content Like this
Thanks For Joining All β€οΈπ₯4β€3π₯°1
Which keyword is used to create a class in Python?
Anonymous Quiz
12%
function
73%
class
10%
object
5%
type
β€3π1
Dear brothers and sisters,
Every day, I try my best to share something useful with you β whether it's quizzes, cheat sheets, project resources, or valuable learning materials. I do it purely out of passion, hoping it helps you learn something new and move a little closer to your goals. β€οΈ
If you feel that my efforts have been helpful in any way,
you can treat me to a cup of tea as a little brotherβs token of appreciation. π₯Ήβ
Your small gesture of support will truly encourage me to keep going and share even more valuable resources, In Sha Allah.
π Click here to support:
π Buy Me a Coffee?
With love and prayers,
β Your little brother π₯°
Every day, I try my best to share something useful with you β whether it's quizzes, cheat sheets, project resources, or valuable learning materials. I do it purely out of passion, hoping it helps you learn something new and move a little closer to your goals. β€οΈ
If you feel that my efforts have been helpful in any way,
you can treat me to a cup of tea as a little brotherβs token of appreciation. π₯Ήβ
Your small gesture of support will truly encourage me to keep going and share even more valuable resources, In Sha Allah.
π Click here to support:
π Buy Me a Coffee?
With love and prayers,
β Your little brother π₯°
β€10π₯1π₯°1
Data Structures and Algorithms in Python (1).pdf
5.6 MB
Data Structures and Algorithm in Python π
Do not forget to React β€οΈ to this Message for More Content Like this
Thanks For Joining All β€οΈβ€7π₯2π₯°1