0% found this document useful (0 votes)
5 views1 page

Session 3- Python Basics

Uploaded by

nikitasehgal383
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views1 page

Session 3- Python Basics

Uploaded by

nikitasehgal383
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Session 3: Python Basics

Q.1 What is a variable?


A.1 A variable is a named place holder of data that is assigned a value. If the
value is modified, the name does not change. A variable in Python can hold any
type of data value.
Q.2 What is an expression?
A.2 An expression is a legal combination of variables, values and operators that
evaluates to a value. Example – Following are some expressions in Python:
3+9
A=25
a/9
Q.3 What are arithmetic operators in Python?
A.3 The arithmetic operators are the symbols which depict some arithmetic
calculations. Following are the different type of operators:
Operator Usage
Addition + Used to add values
Subtraction - Used to subtract second operand from the first one
Multiplication * Used to multiply the values
Division / Used to divide first operand by the second
Floor Division // Used to perform floor division in which only the whole
part of the result is given and decimal part is truncated
Modulus % Used to calculate the remainder
Exponentiation Used to return the result of a number raised to a power
(exponent) e.g. 4**3 evaluates to 64

You might also like