You are on page 1of 40

Lecture 0

INT10 8 :: P YTHON P ROGRAMMING


Course Overview
• L T P: 3 0 2

• Credit: 4

• Text Book :
1. F U N D AM E N T AL S O F P YT H O N – F IR ST
P R O G R AM b y KE N N E T H A. L AM BE R T ,
C E N G AG E L E AR N IN G
References Book:
1. P YT H O N P R O G R AM M IN G : U SIN G P R O BL E M
SO L VIN G AP P R O AC H b y R E E M A T H AR E JA,
O XF O R D U N IVE R SIT Y P R E SS
CA and ETP

CA
Programming Practice(Mandatory) 40 marks

Best 2 out of 3 Test Code - Based each of 30


marks

ETP
Programming Challenge
Marks Breakup
• Marks Breakup:

Activity Marks
Attendance 5
Continuous Assessment 50(20+15+15)
(CA)*
End-Term Practical (ETP) 45

Note :
20 Marks for programming practice, 15 marks for test code based.
Important information
⚫ Programming practice(Python
Programming course ) . Student will
complete it unit wise.
⚫ All code based test will be conducted on
code tantra platform.
⚫ ETE will be conducted on code tantra
platform.
Mandatory conditions for ca
First 50 percent of questions are mandatory
to attempt in programming practice. After
completion of first mandatory 50 %
questions , remaining attempted questions
marks will be awarded.
Mandatory conditions for ca
⚫ Programming practice marks will be
awarded based upon performance in best
2 Code based test. There are total 3 code
best test out of which best 2 will be
considered.
⚫ Each Code based test will contain 10 MCQ
questions each of 1 marks and 2 coding
questions each of 10 marks.
⚫ Duration for code based test will be 1
hours
Performance in best 2 Code based test[x] Weightage of programming practice

x>=81 percent 100 percent marks of programming


practice

71<=x<=80 70 percent marks of programming practice

51<=x<=70 50 percent marks of programming practice

30<=x<=50 30 percent marks of programming practice

X<30 No marks will be awarded in programming


practice
Code Code Code Best 2 Percentage Programmi programming Awarded marks
Based Based Based code ng Practice practice based upon
Test 1 Test 2 Test 3 based Question marks(out of code based
(30) (30) (30) attempted 40) test( out of 40)
24 16 21 45 45/60*100=75 100 40 40*70/100=28
%
30 30 20 60 60/60*100=10 80 24 24*100/100=24
0%
15 30 15 45 45/60*100=75 80 24 24*70/100=16.
% 8
30 30 10 60 60/60*100=10 40 0 0
0%
21 10 21 42 42/60*100=70 90 32 ?
%

Again assume that there are 100 questions in programming practice and
first 50 are mandatory to attempt, marks will be awarded on attempt of
next 50 questions. Use the previous table(mentioned in slide 6 ) for
programming practice marks calculation. Use table mentioned in slide 8 for
Awarded marks based upon code based test
Answer
16
Star Course
Hands - on Practice: A good course which
include interactive coding exercises to help
you apply what you've learned.

This course is a short bite - sized courses that


help students develop foundational - level
knowledge and skills in Python language.
Although the course is packed with high
quality content that helps students further
with their learning and earn credits.
Course Objectives
CO1 :: define the installation of python environment and
basics of Python language
CO2 :: apply the condition and iteration statements for
evaluating the appropriate alternates
CO3 :: apply to formulate Regular Expressions and use them
for Pattern Matching encapsulation, polymorphism, and
inheritance.
CO4 :: construct the core data structures like lists,
dictionaries, tuples and sets in Python to store, process and
sort the data
CO5 :: apply the concepts of Object - oriented programming
as used in Python using encapsulation, polymorphism, and
inheritance
CO6 :: apply the external modules for creating and writing
data to excel files and inspect the file operations to navigate
the file systems
Program Outcomes
• PO1 :Engineering Knowledge : Ap p ly t h e kn o w le d g e o f m a t h e m a t ic s, sc ie n c e ,
e n g in e e rin g fu n d a m e n t a ls, a n d a n e n g in e e rin g sp e c ia liza t io n t o t h e so lu t io n o f c o m p le x
e n g in e e rin g p ro b le m s.
• P O 2 : Problem Analysis : Id e n t ify, fo rm u la t e , re vie w re se a rc h lit e ra t u re , a n d a n a lyse
c o m p le x e n g in e e rin g p ro b le m s re a c h in g su b st a n t ia t e d c o n c lu sio n s u sin g first p rin c ip le s
o f m a t h e m a t ic s, n a t u ra l sc ie n c e s a n d e n g in e e rin g sc ie n c e s.
• P O 3 : Design/Development of Solutions : D e sig n so lu t io n s fo r c o m p le x e n g in e e rin g
p ro b le m s a n d d e sig n syst e m c o m p o n e n t s o r p ro c e sse s t h a t m e e t t h e sp e c ifie d n e e d s
w it h a p p ro p ria t e c o n sid e ra t io n fo r t h e p u b lic h e a lt h a n d sa fe t y, a n d t h e c u lt u ra l,
so c ie t a l, a n d e n viro n m e n t a l c o n sid e ra t io n s.
• P O 4 : Conduct investigations of complex problems : Use re se a rc h -b a se d kn o w le d g e
a n d re se a rc h m e t h o d s in c lu d in g d e sig n o f e xp e rim e n t s, a n a lysis a n d in t e rp re t a t io n o f
d a t a , a n d syn t h e sis o f t h e in fo rm a t io n t o p ro vid e va lid c o n c lu sio n s.
• P O 5 : Modern Tool Usage : Cre a t e , se le c t , a n d a p p ly a p p ro p ria t e t e c h n iq u e s, re so u rc e s,
a n d m o d e rn e n g in e e rin g a n d IT t o o ls in c lu d in g p re d ic t io n a n d m o d e llin g t o c o m p le x
e n g in e e rin g a c t ivit ie s w it h a n u n d e rst a n d in g o f t h e lim it a t io n s.
• P O 6 : The Engineer and Society : Ap p ly re a so n in g in fo rm e d b y t h e c o n t e xt u a l
kn o w le d g e t o a sse ss so c ie t a l, h e a lt h , sa fe t y, le g a l a n d c u lt u ra l issu e s a n d t h e
c o n se q u e n t re sp o n sib ilit ie s re le va n t t o t h e p ro fe ssio n a l e n g in e e rin g p ra c t ic e .
• P O 7 : Environment and Sustainability : Un d e rst a n d t h e im p a c t o f t h e p ro fe ssio n a l
e n g in e e rin g so lu t io n s in so c ie t a l a n d e n viro n m e n t a l c o n t e xt s, a n d d e m o n st ra t e t h e
kn o w le d g e o f, a n d n e e d fo r su st a in a b le d e ve lo p m e n t
Program Outcomes
• PO8 : Ethics : Ap p ly e t h ic a l p rin c ip le s a n d c o m m it t o p ro fe ssio n a l e t h ic s
a n d re sp o n sib ilit ie s a n d n o rm s o f t h e e n g in e e rin g p ra c t ic e .
• P O 9 : Individual and Team Work : Fu n c t io n e ffe c t ive ly a s a n in d ivid u a l,
a n d a s a m e m b e r o r le a d e r in d ive rse t e a m s, a n d in m u lt id isc ip lin a ry
se t t in g s
• P O 10 : Communication : Co m m u n ic a t e e ffe c t ive ly o n c o m p le x e n g in e e rin g
a c t ivit ie s w it h t h e e n g in e e rin g c o m m u n it y a n d w it h so c ie t y a t la rg e , su c h
a s, b e in g a b le t o c o m p re h e n d a n d w rit e e ffe c t ive re p o rt s a n d d e sig n
d o c u m e n t a t io n , m a k e e ffe c t ive p re se n t a t io n s, a n d g ive a n d re c e ive c le a r
in st ru c t io n s.
• P O 11 : Project Management and Finance : D e m o n st ra t e k n o w le d g e a n d
u n d e rst a n d in g o f t h e e n g in e e rin g a n d m a n a g e m e n t p rin c ip le s a n d a p p ly
t h e se t o o n e ’s o w n w o rk , a s a m e m b e r a n d le a d e r in a t e a m , t o m a n a g e
p ro je c t s a n d in m u lt id isc ip lin a ry e n viro n m e n t s.
• P O 12 : Life -long Learning : Re c o g n ize t h e n e e d fo r, a n d h a ve t h e
p re p a ra t io n a n d a b ilit y t o e n g a g e in in d e p e n d e n t a n d life lo n g le a rn in g in
t h e b ro a d e st c o n t e xt o f t e c h n o lo g ic a l c h a n g e .
Why languages?
COMPUTER IS SMART
?????

https://www.youtube.com/watch?v=lfuUiBanV
DM
Computer Language vs. Human
La ng ua g e
Different Computer Languages
Compiler vs. Interpreter
Compiler and Interpreter
⚫ Compiler - it is a translator that converts HLL
program to Low Level program at once and
list all the errors that are visible in the file. It
will convert to machine code file will be
created, every time it will not convert.

⚫ Interpreter - It’s a translator that converts


High level language to low level language line
by line, if any error is there at any point or
line program execution will stop or
debugged. Every time program will be run
and execute the code.
Make language your Friend
Overview of Unit 1
Unit 1
Setting up your Programming Environment :
Python versions, Python on windows, running a
‘Hello World’ program

Variables, Expression and Statements: Naming


and using variables, Avoiding Name Error when
using variables, Values and types, variables,
variables name and keywords, statements,
operators and operand, order of operations,
operations on string, composition and comments
Overview of Unit 2
Unit 2
Conditional statements : modulus operator,
Random numbers, Boolean expressions, logic
operators, conditional, nested conditionals
Iterative statements : while statements, for
loop statement, Nested for, Nested while,
Random numbers in loops, encapsulation and
generalization
Unit 3
Functions and recursion : function calls, type
conversion and coercion, math functions,
adding new function, parameters and
argument, recursion and its use
Unit 4
String : string a compound data type,
length, string traversal, string slices,
comparison, find function, looping and
counting
Lists : list values, length, membership,
operations, slices, deletion, accessing
elements, list and for loops, list parameters
and nested list
Tuples and Dictionaries : mutability and
tuples, tuple assignment, tuple as return
values, dictionaries operations and
methods, sparse matrices, aliasing and
coping
Unit 5
Classes and objects : Creating classes, creating
instance objects, accessing attributes
Object oriented programming terminology : Class
Inheritance, Overriding Methods, Data Hiding,
Function Overloading
Unit 6
Files and Exceptions : text files, writing
variables, Reading from a file, writing to a
file, directories, pickling, handling the zero
Division error exception, using try - except
blocks, The else block, Handling the File
Not found error exception
Regular Expressions : Concept of regular
expression, various types of regular
expressions, using match function, Web
Scraping by using Regular Expressions
History of Python
⚫ Python developed by Guido Van Rassum .
⚫ First released on February 20, 1991
⚫ Named evolved because he is a fan of
comedy sketch series - Monty Python
Flying Circus.
Python one of the fastest growing language

⚫ In terms of developers that are using it


⚫ In terms of libraries that are being used and
added
⚫ In terms of number of companies using it
⚫ For ML
⚫ Software development
⚫ Web development
Python cont..

⚫ Python is interpreted, object oriented,


High level language
⚫ Its both procedural and object oriented
programming language
Downloading the editor
⚫ Python
⚫ Some editor are as follows
⚫ Pycharm
⚫ Jupyter
⚫ Goggle Collab
Features of Python
• Simple
• Easy to learn
• Free and Open Source
• High Level Language
• Interpreted- No need to compile as in java and c, it
can be directly executed
• Portable- Python can work on all platforms
• Object Oriented- Python support object oriented and
procedural oriented Programming
• Extensive libraries
Two types of errors

SYNTAX ERROR- These are like grammatical error.

RUNTIME ERROR- Occur during runtime. These error


occur due to wrong logic.
Extension for Python

Source code will be stored with .py extension

You might also like