Professional Documents
Culture Documents
ARTIFICIAL INTELLIGENCE
PYTHON VIVA QUESTIONS
Q 1) What is python?
Ans. Python is a high level, general-purpose programming language that
can be used to create a variety of programs.
Q 2) Who implemented python?
Ans. Guido Van Rossum in the year 1991.
Q 3) What are the applications of python?
Ans. Web development, Software Development, Machine learning and
Artificial Intelligence, build games, perform scientific computations etc
Q 4) What are the features of python?
Ans. 1) Free and open source
2)Interpreted Language
3) Simple Syntax
4) Case Sensitive Language
5) Platform independent programming language it means it can be
used on any machine and any operating system.
Q 5) What is the difference between a compiler and interpreter?
Ans. A compiler scans the entire program and translates it as a whole into
machine code. Interpreter translates program one statement at a time.
Q 7)What are two working modes of python
Ans. 1) Interactive Mode- instructions are executed line by line
2) Script Mode- instructions are saved as program and then executed.
Q 8) What are conditional statements in python ?
Ans. If-Else statements in Python are part of conditional statements, which
decide the control of code.
Q 9) What is a variable?
Ans. Variables are named storage location that hold some values and it changes
its values during program execution.
For loops are used for sequential traversal. For example: traversing
a list or string or array etc.
Ans. In computer programming, data types specify the type of data that
can be stored inside a variable.
Ans. The len() function returns the number of items (length) in an object.
Example
print(length)
# Output: 3
Ans. The append() method adds an item to the end of the list.
Example