Uploaded by asim.ali.khwaja

session02 - onboard discussions

advertisement
pip install wheel
pip install numpy
pip install scipy
pip install matplotlib
pip install pandas
pip install seaborn
pip install datetime
pip install pygame
pip install pyinstaller
pip install pendulum
pip install imageio
pip install opencv-python
pip install playsound
pip install pyqt5
pip install keras
pip install scikit-learn
pip install tensorflow
pip install tk
integer operators:
floor ( ) = 2
Three data types in Python:
Integer – numeric type
Float – numeric type
String – non-numeric type
A string is a set of characters.
A character is any symbol.
1
‘1’
“Humpty Dumpty” sat on a wall,
“Humpty Dumpty” had a great fall.
All the King’s horses and all the King’s men,
Couldn’t put “Humpty” together again.
Escape Sequence \
Overloaded operators
5+3 = 8
‘a’ + ‘b’ = ‘ab’
Type casting  data type changing functions
Formatted print function
Please enter the first number:
>> 12
Please enter the second number:
>> 3
The sum of 12 and 3 is 15.
You will be printing a multiplication table of a number. You will ask the user to enter the
number b/w 2 and 12 and then print first ten entries of its table.
For e.g.: user entered 2.
2
2
2
2
2
2
2
2
2
2
x 1
x 2
x 3
x 4
x 5
x 6
x 7
x 8
x 9
x 10
=
=
=
=
=
=
=
=
=
=
2
4
6
8
10
12
14
16
18
20
Download