phython
phython
phython
ASSIGNMENT: 01
QUESTIONS:
What are the different data types in python? Provide examples for each.
Explain the concept of variables and how they are used in python.
What are operators and their types in python? Give examples of arithmetic,
comparison, and logical operators.
1.python is a high-level, general-purpose programming language with dynamic
semantics.it was created by Guido van Rossum in the late 1980s and named after the
British comedy group Monty Python’s Flying Circus.
Python’s popularity stems from its simplicity, readability, and versatility, making it
suitable for a wide range of applications, including web development, data science,
machine learning and automation.
It differs from a program in that a script is typically designed to perform a specific task
or set of tasks, whereas a program can be more complex and modular, consisting of
multiple scripts or modules working together.
4.In python, a variable is a name given to value that can be stored manipulated in the
computer’s data types, and their values can change during the execution program.
Variables are used to store and retrieve data, perform calculations, and manipulate data
in various ways.
6.The python interpreter is a program that translates python code into machine code
that can be executed by the computer’s processor. When you write and run python code,
the interpreter reads the code, performs syntax analysis, compiles it into bytecode. This
process allows you to write and run python programs without the need for explicit
compilation.
7.comments in python are lines of code that are ignored by the interpreter and are used
to provide explanations, notes, or additional information to programmers or other
readers of the code. Comments begin with the “#” symbol and continue until the end of
the line. Comments are useful for documenting code, explaining algorithms or logic, and
making it easier to understand maintain.