Programming Using Python: Amey Karkare Dept. of CSE IIT Kanpur
Programming Using Python: Amey Karkare Dept. of CSE IIT Kanpur
Amey Karkare
Dept. of CSE
IIT Kanpur
1
Welcome Python Programming E&ICT IIT Kanpur
About me
Amey Karkare
Dept. of CSE
IIT Kanpur
http://www.cse.iitk.ac.in/~karkare
2
Welcome Programming E&ICT IIT Kanpur
Acknowledgements
➢ The images/contents are used for
teaching purpose and for fun. The
copyright remains with the original
creator. If you suspect a copyright
violation, bring it to my notice and I
will remove that image/content.
3
Welcome Python Programming E&ICT IIT Kanpur
The Course
➢The course teaches you how to solve
problems using the computer.
➢No prior exposure to programming is
expected.
4
Welcome Python Programming E&ICT IIT Kanpur
A Computer?
6
Welcome Python Programming E&ICT IIT Kanpur
Process of Programming
Problem
Description
X
Solution Model of the
Code Problem
Logical
Solution
7
Welcome Python Programming E&ICT IIT Kanpur
Process of Programming
Problem
Description
9
Welcome Python Programming E&ICT IIT Kanpur
Process of Programming: Step 2
➢Obtain a logical solution to your problem.
➢A logical solution is a finite and clear
step-by-step procedure to solve your
problem.
➢Also called an Algorithm.
➢We can visualise this using a Flowchart.
➢Very important step in the programming
process.
10
Welcome Python Programming E&ICT IIT Kanpur
Algorithms in real-life
11
Welcome Python Programming E&ICT IIT Kanpur
Algorithms in real-life
• Assembly instructions for a make-
it-yourself kit.
http://www.gocomics.com/calvinandhobbes/2009/06/02
12
Welcome Python Programming E&ICT IIT Kanpur
Process of Programming: Step 3
➢Convert the Algorithm into working code.
➢This is the stage where you require a
language to communicate with the
computer
➢Syntax and Semantics of the language
➢If your model or the logical solution is
wrong, the program will also be wrong
➢Garbage In, Garbage Out
13
Welcome Python Programming E&ICT IIT Kanpur