Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

50+ Python Interview Questions

These questions are for Beginner Level. A maximum of these questions are conceptual. You can take
advantage of these questions during interview preparations and during revising or studying Python as
well.

What topics will we cover?


➊ Basics
➋ Data Types
➌ bool Type
➍ Numeric Types
➎ Variables

➊ Basics

➀ What is Python?
➁ What are the advantages of using Python?
➂ What are the limitations of Python?
➃ In what types of applications is Python widely used?
➄ What are some popular Python-based packages/libraries?
➅ What is PEP?
➆ What is PEP 8?

➋ Data Types

➀ What data types does Python support?


➁ How to determine the data type of a value?
➂ What is "None"?
➃ What is the type of "None"?
➄ Give some examples where "None" can be used.
➅ What is type conversion?
➆ How does type conversion happen in Python?
➇ What are mutable and immutable?
➈ Which built-in types in Python are immutable?

➌ bool Type
➀ What boolean literals does Python provide?
➁ What all in Python are converted to False?
➂ How to convert a value to a boolean?

➍ Numeric Types

➀ Which of the built-in types are classified as numeric types?


➁ Given a list of literals, choose valid numeric literals.
➂ Which bases of numbers does Python support?
➃ How to write binary number literals?
➄ How to write octal number literals?
➅ How to write hexadecimal number literals?
➆ How to convert a value to an integer type?
➇ How to convert a value to a float type?
➈ How to convert a value to a complex type?
➉ How to convert a decimal to a binary, octal, or hexadecimal?
➀➀ How to convert a binary, octal, or hexadecimal to a decimal?
➀➁ What is math.nan?
➀➂ Which operations will result in math.nan?
➀➃ How to check if a value is math.nan?
➀➄ What are math.inf and -math.inf?
➀➅ Which operations will result in math.inf?
➀➆ What is the data type of math.nan, math.inf, and -math.inf?
➀➇ What will "divide by zero" result in?
➀➈ What is a numeric separator? Why is it used?
20. How to write a complex number literal?
➁➀ How is a complex number converted to an integer or float and vice versa?

➎ Variables

➀ What is a variable?
➁ How to name a variable?
Or,
➂ Choose a valid variable name.
➃ Is variable declaration mandatory in Python?
➄ What is the difference between static-typed and dynamic-typed?
➅ Is Python static or dynamic typed?

➆ How to check the type of a variable?


➇ What is variable scope?
➈ What is the 'global' keyword used for?
➉ How to define a global variable?
➀➀ How to access a global variable?

Disclaimer

⬘ The questions covered here are mostly conceptual. You should practice and solve problems for
becoming a skilled programmer.

⬙ I don't claim only these types of questions are asked during interviews.

Reach out to me

Did you find these questions useful? I am sharing interview and practice questions on Python,
JavaScript, SQL, Data Structures and Algorithms, etc. Do reach out to me on Twitter @swapnakpanda

You might also like