Skip to content

chandantech56/python-class

Repository files navigation

--

1. What is Python? List some popular applications of Python in the world of technology.

Python is a widely-used general-purpose, high-level programming language. It was created by Guido van Rossum in 1991 and further developed by the Python Software Foundation. It was designed with an emphasis on code readability, and its syntax allows programmers to express their concepts in fewer lines of code. It is used for:

System Scripting

Web Development

Game Development

Software Development

Complex Mathematics


2. What are the benefits of using Python language as a tool in the present scenario?

--- #The following are the benefits of using Python language:

Object-Oriented Language High-Level Language Dynamically Typed language Extensive support for Machine Learning Libraries Presence of third-party modules Open source and community development Portable and Interactive Portable across Operating systems

--

3. Is Python a compiled language or an interpreted language?

Actually, Python is a partially compiled language and partially interpreted language. The compilation part is done first when we execute our code and this will generate byte code internally this byte code gets converted by the Python virtual machine(p.v.m) according to the underlying platform(machine+operating system).

4. What does the ‘#’ symbol do in Python?

‘#’ is used to comment on everything that comes after on the line.

5. What is the difference between a Mutable datatype and an Immutable data type?

Mutable data types can be edited i.e., they can change at runtime. Eg – List, Dictionary, etc. Immutable data types can not be edited i.e., they can not change at runtime. Eg – String, Tuple, etc.

6. What is the difference between a Set and Dictionary?

The set is unordered collection of unique items that is iterable and mutable.

7,What is Scope in Python?

The location where we can find a variable and also access it if required is called the scope of a variable.

Python Local variable:

Local variables are those that are initialized within a function and are unique to that function. It cannot be accessed outside of the function.

Python Global variables:

Global variables are the ones that are defined and declared outside any function and are not specified to any function.

Module-level scope:

It refers to the global objects of the current module accessible in the program.

Outermost scope:

It refers to any built-in names that the program can call. The name referenced is located last among the objects in this scope.

A dictionary in Python is an ordered collection of data values, used to store data values like a map.

Releases

No releases published

Packages

No packages published

Languages