Lab 1 - Machine
Lab 1 - Machine
Anaconda
Anaconda is the full distribution of Python, it installs Python, Jupyter notebook, and other relevant
libraries for scientific computing that aims to simplify package management and deployment.
Install Anaconda
Go to the following link: https://www.anaconda.com/download
1. 2.
3. 4.
5. 6.
Introduction to Jupyter
In Notebook you write and run your code in a small segment and the segments are called cells.
Example
Python Syntax
Arithmetic Operations
Comparison Operators
Strings
Tuple
Tuple data type is exactly same as list data type except that it is immutable (we cannot change values).
Tuple elements can be represented within parenthesis.
Tuple is the read only version of list
Dictionary
If we want to represent a group of values as key-value pairs, then we should go for dict data type.
Eg: d = {101:'one',102:'two', 103:'three'}
Duplicate keys are not allowed but values can be duplicated. If we are trying to insert an entry with
duplicate key, then old value will be replaced with new value.
Numpy
Numpy is the code computing package in Python.
To use numpy we need to import the module.