Python Interview Questions - Basics
- Metric Coders
- Apr 25, 2023
- 1 min read
What is Python?
Binary language
Scripting language
Programming language
Computer language
Answer
Answer is 3
Python is a high-level, general-purpose programming language
Why was the programming language named as Python?
The developer's love for snakes
It is named after the British comedy group Monty Python
Both of the above
None of the above
Answer
Answer is 2
Python is named after a British comedy group called the Monty Python. Van Rossum thought he needed a name that was short, unique, and slightly mysterious, so he decided to call the language Python.
Who developed Python programming language?
Brendan Eich
Guido van Rossum
James Gosling
Rasmus Lerdorf
Answer
Answer is 2
Brendan Eich developed Javascript
Guido van Rossum developed Python programming language
James Gosling developed Java programming language
Rasmus Lerdorf developed PHP
In which year was Python developed?
1995
2001
1991
1994
Answer
Answer is 3
Java and Javascript was developed in 1995
Scala was developed in 2001
Python was developed in 1991
PHP was developed in 1994
What type of programming language is python?
Interpreted programming language
interactive programming language
Object-oriented programming language
All of the above
Answer
Answer is 4
Python is an interpreted, interactive, object-oriented programming language.
What is the extension of Python files which contains the source code?
.p
.python
.py
.pyc
Answer
Answer is 3
.py files contain the source code of a program. Whereas . pyc file contains the bytecode of your program.
Is Python interpreted or compiled language?
Python is neither interpreted or compiled
Python is both interpreted and compiled
Python is only interpreted
Python is only compiled
Answer
Answer is 2
Python is both compiled and interpreted language. Python code is first compiled and then interpreted line by line. The compiled code gets deleted as soon as the code gets executed in Python.
In which language is Python written?
C
C++
PHP
Java
Answer
Answer is 1
Python is written in C language.
What are the the rules that define python programming language called?
Code
Comments
Syntax
Procedures
Answer
Answer is 3
How is a block of code defined in python?
( ... )
{ … }
spaces ot tab
Enter
Answer
Answer is 3 Python uses indentation which are spaces or tabs to define blocks of code.