Python Interview Questions for Freshersπ§ π¨βπ»
1. What is Python?
Python is a high-level, interpreted, general-purpose programming language. Being a general-purpose language, it can be used to build almost any type of application with the right tools/libraries. Additionally, python supports objects, modules, threads, exception-handling, and automatic memory management which help in modeling real-world problems and building applications to solve these problems.
2. What are the benefits of using Python?
Python is a general-purpose programming language that has a simple, easy-to-learn syntax that emphasizes readability and therefore reduces the cost of program maintenance. Moreover, the language is capable of scripting, is completely open-source, and supports third-party packages encouraging modularity and code reuse.
Its high-level data structures, combined with dynamic typing and dynamic binding, attract a huge community of developers for Rapid Application Development and deployment.
3. What is a dynamically typed language?
Before we understand a dynamically typed language, we should learn about what typing is. Typing refers to type-checking in programming languages. In a strongly-typed language, such as Python, "1" + 2 will result in a type error since these languages don't allow for "type-coercion" (implicit conversion of data types). On the other hand, a weakly-typed language, such as Javascript, will simply output "12" as result.
Type-checking can be done at two stages -
Static - Data Types are checked before execution.
Dynamic - Data Types are checked during execution.
Python is an interpreted language, executes each statement line by line and thus type-checking is done on the fly, during execution. Hence, Python is a Dynamically Typed Language.
4. What is an Interpreted language?
An Interpreted language executes its statements line by line. Languages such as Python, Javascript, R, PHP, and Ruby are prime examples of Interpreted languages. Programs written in an interpreted language runs directly from the source code, with no intermediary compilation step.
5. What is PEP 8 and why is it important?
PEP stands for Python Enhancement Proposal. A PEP is an official design document providing information to the Python community, or describing a new feature for Python or its processes. PEP 8 is especially important since it documents the style guidelines for Python Code. Apparently contributing to the Python open-source community requires you to follow these style guidelines sincerely and strictly.
6. What is Scope in Python?
Every object in Python functions within a scope. A scope is a block of code where an object in Python remains relevant. Namespaces uniquely identify all the objects inside a program. However, these namespaces also have a scope defined for them where you could use their objects without any prefix. A few examples of scope created during code execution in Python are as follows:
A local scope refers to the local objects available in the current function.
A global scope refers to the objects available throughout the code execution since their inception.
A module-level scope refers to the global objects of the current module accessible in the program.
An outermost scope refers to all the built-in names callable in the program. The objects in this scope are searched last to find the name referenced.
Note: Local scope objects can be synced with global scope objects using keywords such as global.
1. What is Python?
Python is a high-level, interpreted, general-purpose programming language. Being a general-purpose language, it can be used to build almost any type of application with the right tools/libraries. Additionally, python supports objects, modules, threads, exception-handling, and automatic memory management which help in modeling real-world problems and building applications to solve these problems.
2. What are the benefits of using Python?
Python is a general-purpose programming language that has a simple, easy-to-learn syntax that emphasizes readability and therefore reduces the cost of program maintenance. Moreover, the language is capable of scripting, is completely open-source, and supports third-party packages encouraging modularity and code reuse.
Its high-level data structures, combined with dynamic typing and dynamic binding, attract a huge community of developers for Rapid Application Development and deployment.
3. What is a dynamically typed language?
Before we understand a dynamically typed language, we should learn about what typing is. Typing refers to type-checking in programming languages. In a strongly-typed language, such as Python, "1" + 2 will result in a type error since these languages don't allow for "type-coercion" (implicit conversion of data types). On the other hand, a weakly-typed language, such as Javascript, will simply output "12" as result.
Type-checking can be done at two stages -
Static - Data Types are checked before execution.
Dynamic - Data Types are checked during execution.
Python is an interpreted language, executes each statement line by line and thus type-checking is done on the fly, during execution. Hence, Python is a Dynamically Typed Language.
4. What is an Interpreted language?
An Interpreted language executes its statements line by line. Languages such as Python, Javascript, R, PHP, and Ruby are prime examples of Interpreted languages. Programs written in an interpreted language runs directly from the source code, with no intermediary compilation step.
5. What is PEP 8 and why is it important?
PEP stands for Python Enhancement Proposal. A PEP is an official design document providing information to the Python community, or describing a new feature for Python or its processes. PEP 8 is especially important since it documents the style guidelines for Python Code. Apparently contributing to the Python open-source community requires you to follow these style guidelines sincerely and strictly.
6. What is Scope in Python?
Every object in Python functions within a scope. A scope is a block of code where an object in Python remains relevant. Namespaces uniquely identify all the objects inside a program. However, these namespaces also have a scope defined for them where you could use their objects without any prefix. A few examples of scope created during code execution in Python are as follows:
A local scope refers to the local objects available in the current function.
A global scope refers to the objects available throughout the code execution since their inception.
A module-level scope refers to the global objects of the current module accessible in the program.
An outermost scope refers to all the built-in names callable in the program. The objects in this scope are searched last to find the name referenced.
Note: Local scope objects can be synced with global scope objects using keywords such as global.
βοΈ G-Mail keyboard shortcuts βοΈ
#pc_feature #OldPost
Here is the complete list of Gmail keyboard shortcuts:
Compose and Chat
<Shift> + <Esc> : Focus main window
<Esc> : Focus latest chat or compose
<Ctrl> + . : Advance to next chat or compose
<Ctrl> + , : Advance to previous chat or compose
<Ctrl> + <Enter> : Send
<Ctrl> + <Shift> + c : Add cc recipients
<Ctrl> + <Shift> + b : Add bcc recipients
<Ctrl> + <Shift> + f : Access custom from
<Ctrl> + k : Insert a link
<Ctrl> + ; : Go to previous misspelled word
<Ctrl> + ' : Go to next misspelled word
<Ctrl> + m : Open spelling suggestions
Formatting
<Ctrl> + <Shift> + 5 : Previous font
<Ctrl> + <Shift> + 6 : Next font
<Ctrl> + <Shift> + - : Decrease text size
<Ctrl> + <Shift> + + : Increase text size
<Ctrl> + b : Bold
<Ctrl> + i : Italics
<Ctrl> + u : Underline
<Ctrl> + <Shift> + 7 : Numbered list
<Ctrl> + <Shift> + 8 : Bulleted list
<Ctrl> + <Shift> + 9 : Quote
<Ctrl> + [ : Indent less
<Ctrl> + ] : Indent more
<Ctrl> + <Shift> + l : Align left
<Ctrl> + <Shift> + e : Align center
<Ctrl> + <Shift> + r : Align right
<Ctrl> + <Shift> + , : Set right-to-left
<Ctrl> + <Shift> + . : Set left-to-right
<Ctrl> + \ : Remove formatting
Jumping
g then i : Go to Inbox
g then s : Go to Starred conversations
g then t : Go to Sent messages
g then d : Go to Drafts
g then a : Go to All mail
g then c : Go to Contacts
g then k : Go to Tasks
g then l : Go to Label
Threadlist selection
* then a : Select all conversations
* then n : Deselect all conversations
* then r : Select read conversations
* then u : Select unread conversations
* then s : Select starred conversations
* then t : Select unstarred conversations
Navigation
u : Back to threadlist
k / j : Newer/older conversation
o or <Enter> : Open conversation; collapse/expand conversation
p / n : Read previous/next message
` : Go to next inbox section
~ : Go to previous inbox section
Application
c : Compose
d : Compose in a tab (new compose only)
/ : Search mail
q : Search chat contacts
. : Open "more actions" menu
v : Open "move to" menu
l : Open "label as" menu
? : Open keyboard shortcut help
Actions
, : Move focus to toolbar
x : Select conversation
s : Rotate superstar
y : Remove label
e : Archive
m : Mute conversation
! : Report as spam
# : Delete
r : Reply
<Shift> + r : Reply in a new window
a : Reply all
<Shift> + a : Reply all in a new window
f : Forward
<Shift> + f : Forward in a new window
<Shift> + n : Update conversation
] / [ : Remove conversation from current view and go previous/next
} / { : Archive conversation and go previous/next
z : Undo last action
<Shift> + i : Mark as read
<Shift> + u : Mark as unread
_ : Mark unread from the selected message
+ or = : Mark as important
- : Mark as not important
<Shift> + t : Add conversation to Tasks
#pc_feature #OldPost
Here is the complete list of Gmail keyboard shortcuts:
Compose and Chat
<Shift> + <Esc> : Focus main window
<Esc> : Focus latest chat or compose
<Ctrl> + . : Advance to next chat or compose
<Ctrl> + , : Advance to previous chat or compose
<Ctrl> + <Enter> : Send
<Ctrl> + <Shift> + c : Add cc recipients
<Ctrl> + <Shift> + b : Add bcc recipients
<Ctrl> + <Shift> + f : Access custom from
<Ctrl> + k : Insert a link
<Ctrl> + ; : Go to previous misspelled word
<Ctrl> + ' : Go to next misspelled word
<Ctrl> + m : Open spelling suggestions
Formatting
<Ctrl> + <Shift> + 5 : Previous font
<Ctrl> + <Shift> + 6 : Next font
<Ctrl> + <Shift> + - : Decrease text size
<Ctrl> + <Shift> + + : Increase text size
<Ctrl> + b : Bold
<Ctrl> + i : Italics
<Ctrl> + u : Underline
<Ctrl> + <Shift> + 7 : Numbered list
<Ctrl> + <Shift> + 8 : Bulleted list
<Ctrl> + <Shift> + 9 : Quote
<Ctrl> + [ : Indent less
<Ctrl> + ] : Indent more
<Ctrl> + <Shift> + l : Align left
<Ctrl> + <Shift> + e : Align center
<Ctrl> + <Shift> + r : Align right
<Ctrl> + <Shift> + , : Set right-to-left
<Ctrl> + <Shift> + . : Set left-to-right
<Ctrl> + \ : Remove formatting
Jumping
g then i : Go to Inbox
g then s : Go to Starred conversations
g then t : Go to Sent messages
g then d : Go to Drafts
g then a : Go to All mail
g then c : Go to Contacts
g then k : Go to Tasks
g then l : Go to Label
Threadlist selection
* then a : Select all conversations
* then n : Deselect all conversations
* then r : Select read conversations
* then u : Select unread conversations
* then s : Select starred conversations
* then t : Select unstarred conversations
Navigation
u : Back to threadlist
k / j : Newer/older conversation
o or <Enter> : Open conversation; collapse/expand conversation
p / n : Read previous/next message
` : Go to next inbox section
~ : Go to previous inbox section
Application
c : Compose
d : Compose in a tab (new compose only)
/ : Search mail
q : Search chat contacts
. : Open "more actions" menu
v : Open "move to" menu
l : Open "label as" menu
? : Open keyboard shortcut help
Actions
, : Move focus to toolbar
x : Select conversation
s : Rotate superstar
y : Remove label
e : Archive
m : Mute conversation
! : Report as spam
# : Delete
r : Reply
<Shift> + r : Reply in a new window
a : Reply all
<Shift> + a : Reply all in a new window
f : Forward
<Shift> + f : Forward in a new window
<Shift> + n : Update conversation
] / [ : Remove conversation from current view and go previous/next
} / { : Archive conversation and go previous/next
z : Undo last action
<Shift> + i : Mark as read
<Shift> + u : Mark as unread
_ : Mark unread from the selected message
+ or = : Mark as important
- : Mark as not important
<Shift> + t : Add conversation to Tasks
π Wishing you a year filled with laughter, prosperity, and the fulfillment of your dreams. Happy New Year 2024, dear friend! ππ
Happy New Year 2024 πβ€οΈ
Happy New Year 2024 πβ€οΈ
What will be the Output of the following code?
Anonymous Quiz
34%
0,1,0,1
17%
0 1 0 1
20%
0,0,1,1
30%
0,1,0,1,
Step 1: Learn HTML & CSS
Step 2: Learn Java Script
Step 3: Learn React, Node JS
Step 4: MySql
Step 5: MongoDB
Step 6: Git Commands
Step 7: Build Projects & Push on GitHub
Step 8: Practice, Practice & Practice
Step 2: Learn Java Script
Step 3: Learn React, Node JS
Step 4: MySql
Step 5: MongoDB
Step 6: Git Commands
Step 7: Build Projects & Push on GitHub
Step 8: Practice, Practice & Practice
Python standard modules :- https://www.instagram.com/p/C8LlULGClHV/?igsh=MWtmb2NydGltMzEzZA==