What Is Python?
Python is an interpreted programming language.It is object-oriented high-level programming language.Compared to other programming languages it is highly readable and has less syntax elements.
How Python applications are executed?
At runtime Python programs are executed by the interpreter.So you have to install the Python interpreter on your machine if you want to execute Python programs.You don’t need to compile your program ,it is directly executed by the interpreter.Internally it converts the source code to bytecode before it is converted to machine code.
Is Python Object Oriented?
Yes Python is Object Oriented.You can write programs in Python which follows the OOP concepts of Encapsulation,Abstraction,Polymorphism and Inheritance.
What is a List?
List in Python is a collection of values.You define list as:
my_list = [1, 2, 3]
you can even declare different types of data in a List
my_list = [1, 2, “three”]
What are the advantages of Python?
- Easy syntax to learn
What are built in data types in Python?
- int: Integers
- long: Long integers
- float: Floating Point numbers
- complex: Complex Numbers
- str: String
- bytes: integers in the range of 0-255
- byte array: byte array
Is python statically or dynamically typed?
Python is dynamically typed as you don’t need to assign data type to variables when you declare them
For example you can declare a variable as:
name=1 and then
reassign name with string value :
What are the different loops in Python?
Two of the most common looping structures in Python are:
while (boolean expression):
for i in range (1,5):