Q-1:- What is Python?
Python is an interpreted, high-level, general-purpose programming language.
Python is a cross-platform programming language, meaning, it runs on multiple platforms like Windows, Mac OS X, Linux etc.
Python was introduced to the world in the year 1991 by Guido van Rossum
Q-2:- Python Features and Advantages:
- Simple and easy to Learn:
- Python is simple language & easy to learn
- Free and Open Source:
- Python is a open source language, so that anyone can use the python software without purchasing licence.
- Anyone can read the python source code and can able to do the modification in the source code and also we can redistribute that code to others.
- High Level Language:
- Python is a High Level Programming Language.
- It is easy to write and maintain programs written in High Level Language.
- Python is Interpreted Language:
- Like PHP, Python is also Interpreted language.
- Python interpreter is responsible for execution of python applications.
- Portable & Platform Independent:
- The python applications are portable. The applications which are developed by python on one platform are going to execute any platform without making any changes.
- To achieve the portability feature with respect to the every operating system a separate python software is developed for every version of python.
- Embeddable Language:
- We can embed the python code into other languages such as C,C++, Java and etc..
- In order to provide the scripting capabilities to other languages we can use the python code in it.
- Extensive Support Libraries:It provides large standard libraries that include the areas like string operations, Internet, web service tools, operating system interfaces and protocols. Most of the highly used programming tasks are already scripted into it that limits the length of the codes to be written in Python.
- Built-in Data Structure:It contains lots of data structure like lists, numbers & dictionaries.
Q-3:- Is python a case sensitive language?
Yes, Python is case sensitive programming language.Q-4:- What are Namespaces in Python?
A namespace is basically a system to make sure that all the names in a program are unique and can be used without any conflict.Q-5:- What are basic Data Types in Python?
Following are the most commonally used basic Data Types in Python:- Number
- String
- List
- Tuple
- List
- Sets
- Dictionary
- Boolean
Q-6:- What is the difference between Lists and Tuples?
Lists | Tuples |
Lists are mutable, i.e. they can be edited. | Tuples are immutable, i.e. they cannot be edited. |
Lists are slower than tuples. | Tuples are faster than lists. |
Syntax: myList = [1,5,10] | Syntax: myTuple = (1,5,10) |
Q-7:- What is pass in Python?
Pass means, no-operation Python statement, or in other words, it is a placeholder in a compound statement, where there should be a blank left and nothing has to be written there.Q-8:- What is the difference between list and tuple?
The main difference between lists and a tuples is that -lists are mutable whereas tuples are immutable.
0 Comments