Practical :- 01
Aim:- Python code to print Fibonacci series
Code:-
Practical :- 02
Aim:- Python code to perform arithmetic operations
Code:-
Practical :- 03
Aim:- Python code to find area of triangle
Code:-
Practical :- 04
Aim:- python code to solve quadratic equation
Code:-
Practical :- 05
Aim:- python code for Swapping of 2 variables
Code:-
Practical :- 06
Aim:- python code to Check prime number
Code:-
Practical :- 07
Aim:- python code to perform following operations on strings:
• Create string type variable
• Slicing of strings
• Concatenation of strings
• Comparison of strings
• Formatting of strings
Code:-
Practical :- 08
Aim:- Python code to illustrate use of
• Arbitrary arguments
• Keyword arguments
• Arbitrary keyword arguments
Code:-
Practical :- 08
Aim:- Installation of Jupyter/ Google collab, and
• Survey of Jupyter Dashboard
• Adding new notebook
Code:-
Practical :- 09
Aim:- Python codes to demonstrate usage of NumPy library to:
• Install NumPy and show its version
• Create array using NumPy
• Use of arange()
• zeros
• ones
• full
• random 2D array
• shaping and reshaping of an array
• linspace
• identity matrix
• create and load a csv file using NumPy (Hint: loadtxt())
Code:-
Output:-
Practical :- 11
Aim:- Working with NumPy arrays
• Create and find Max value in a 4 X 4 array
• Find axis-wise max value from the above created array
• Transpose of above created array matrix
• Use of NumPy attributes and methods (e.g. : dtype(int 8, int 16, int
32, int 64), shape, size, itemsize, ndim, empty, empty_like, ravel,
argmax(), argmin(), argsort(), sqrt(), where(), count_nonzero() )
• Convert NumPy array to list and check.
Code:-
Output:-
Practical :- 12
Aim:- Jupyter console - create a notebook and show use of various types of cells
• Add code cell
• Add mark down cells, and perform following:
➢ add levels of headers/headings
➢ make text bold and italics
➢ create ordered list
➢ create bullet list
➢ create hyperlinks
➢ create a table
➢ insert an image
• Demonstrate usage of kernel menu in Jupyter.
• Demonstrate usage of checkpoint in Jupyter.
Creating a notebook : by new notebook option we can create new notebook
Various types of cells:
1) Run cells : it will run the current cell
2) Run cells and select below
3) Run cells and insert below: Executes the selected cell(s) and inserts a new cell below it.
4) Run all : Executes all cells in the notebook, starting from the top.
5) Run all above : Executes all cells above the currently selected cell.
6) Run all below : Executes all cells below the currently selected cell.
7) Cell type : the "Cell Type" submenu allows you to change the type of the selected cell.
a)code : This type of cell is used for writing and executing code in various programming
languages supported by Jupyter, such as Python, R, Julia, etc.
b)marqdown : Markdown cells
allow you to write text using Markdown syntax.
Markdown cells are commonly used for adding
explanations, documentation, or formatted text to
your notebook.
c)Raw NBConvert:Raw cells are used to include content that should not be executed by the notebook's
kernel. They are typically used when exporting the notebook to other formats using nbconvert.
Add code cell : from ‘+’ option we can add cell
5)
6)
Practical :- 13
Aim:-Working with Pandas Series and DataFrame
Code:-