Python Homework
Python Homework
Variable
Types of variables
Numbers which can be as an integer or a float
String which can be
written with a single
quote or double
quotes
Mixing the operators
with numbers and a
string will not work
Tuple
A tuple is a collection of objects that are separated
by a comma, once a tuple is created it cannot be
modified
Boolean
This is a data type that can only have one possible
value which is true or false.it is used to represent
the truth values of expression
String(s)
A string represents textual data, it is a sequence of
characters a string contains numbers, symbols or
letters
Integer
Int, or integer, is a whole number, positive or negative, without
decimals, of unlimited length.
Float
+ Addition 10+3
- Subtraction 10-3
* Multiplication 10*3
/ Division 10/3
% Modulus 10%3
** Exponentiation 10**3