You are on page 1of 4

CE259: Programming in Python A.

Y:2022-23[EVEN] 21DCE043

CHAROTAR UNIVERSITY OF SCIENCE & TECHNOLOGY


DEVANG PATEL INSTITUTE OF ADVANCE TECHNOLOGY &
RESEARCH
Department of Computer Engineering

SET: 1
Practical : 1.1
AIM: Introduction to Python Programming. Installation & Configuration of Python. Along with
its all-major editors, IDLE, Pycharm, Anaconda, Jupyter, Interpreter etc.

Introduction:
Python is a widely used general-purpose, high level programming language. It was
created by Guido van Rossum in 1991 and further developed by the Python Software
Foundation. It was designed with an emphasis on code readability, and its syntax allows
programmers to express their concepts in fewer lines of code. Python is a programming language
that lets you work quickly and integrate systems more efficiently. There are two major Python
versions: Python 2 and Python 3. Both are quite different.
The most recent major version of Python is Python 3, which we shall be using in this
tutorial. However, Python 2, although not being updated with anything other than security
updates, is still quite popular.
It is possible to write Python in an Integrated Development Environment, such as
Thonny, Pycharm, Netbeans or Eclipse which are particularly useful when managing larger
collections of Python files.

Language features:
a) Interpreted
b) Platform Independent
c) Free and Open Source
d) High-level Language
e) Simple
f) Embeddable
g) Robust
h) Rich Library Support

DEPSTAR(CE) 1
CE259: Programming in Python A.Y:2022-23[EVEN] 21DCE043

Installation & Configuration of Python (Installing Python 3.5/3.6.2):


Step:1 Go to www.python.org click on the Python 3.5/3.6.2

Step:2 Go to your Downloads directory, right click on the installer and click on Run as
administrator.

DEPSTAR(CE) 2
CE259: Programming in Python A.Y:2022-23[EVEN] 21DCE043

Step:3 Make sure you check the option Add Python 3.6 to PATH and click on the Install Now.

DEPSTAR(CE) 3
CE259: Programming in Python A.Y:2022-23[EVEN] 21DCE043

Practical: 1.2
AIM: Write a python program to calculate simple interest.
Program Code:
print("Enter your amount: ")
p=int(input())
print("Enter rate of Interest: ")
r=float(input())
print("Enter a time period(In a year): ")
n=int(input())
interest=float((p*r*n)/100)
print("Total interst is: ",interest)
print("21DCE043")
Output:

Learning Outcomes:
In this practical, following concepts were learnt:
1. The list functions such as insert,append,remove,sort
2. We learnt how we can print the list multiple times without using loops
3. We learnt that how we can copy the list using slice function.
4. How we can define tuples, use the different tuple functions such as max,min and sum.

DEPSTAR(CE) 4

You might also like