0% found this document useful (0 votes)
8 views

1

The document provides an introduction to a programming course focused on Python, highlighting its simplicity, versatility, and wide applications. It outlines course objectives, learning outcomes, and the structure of the curriculum, which includes modules on basic programming concepts and data structures. Additionally, it covers administrative details, resources for learning, and the importance of programming in a management program.

Uploaded by

Nimal V
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

1

The document provides an introduction to a programming course focused on Python, highlighting its simplicity, versatility, and wide applications. It outlines course objectives, learning outcomes, and the structure of the curriculum, which includes modules on basic programming concepts and data structures. Additionally, it covers administrative details, resources for learning, and the importance of programming in a management program.

Uploaded by

Nimal V
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 20

Introduction to

Programming
Tamal Das
Department of Computer Science and Engineering
IIT Dharwad
Food for thought
• Why a programming course in a management program?
• What do you expect to learn from this course?

Nov 30, 2024 Introduction to Programming 2


Nov 30, 2024 Introduction to Programming 3
Source: https://www.techrepublic.com/article/which-is-the-fastest-growing-programming-language-hint-its-not-javascript/
Python – Perfect Beginner's
Language!
• Clear and Simple Syntax
• Interactive
• Powerful
• Flexible
• Modern
• Object-oriented
• Rapid Prototyping

Nov 30, 2024 Introduction to Programming 4


Introducing Python
• Powerful, yet easy-to-learn • Powerful
• Developed by Guido van Rossum • Versatile
in 1991 • Diverse use-cases
• Easy to use • Object-oriented
• Closer to English • vs. Sequential Programming
• Shorter code • Optional in Python
• Rapid prototyping • Runs Everywhere
• Strong community • Platform independent
• Free and Open-source

Nov 30, 2024 Introduction to Programming 5


Introducing Python
• Used for
• Web development (server-side)
• Software development
• Mathematics
• System scripting
• Rapid prototyping
• Production-ready software
development
• Database applications

Nov 30, 2024 Introduction to Programming 6


Why Python?
• Gentle learning curve
• Freely available
• Cross-platform (Windows, Mac, Linux, Raspberry Pi, etc.)
• Widely used – extensive capabilities, documentation, and support
• Access to advanced math, statistics, database functions, web
applications
• Simple, interpreted language – no compilation step
• Can be used either as scratchpad or as a program
• Simple syntax, similar to the English language
Nov 30, 2024 Introduction to Programming 7
Setting up Python

Windows Other Operating Systems


• Download Python • May come pre-installed
• Run the installer • Refer python.org
• Accept the default configuration

Nov 30, 2024 Introduction to Programming 8


Introducing IDLE

Interactive Mode Script mode


• An experimental scratchpad • Meant for writing programs to
• Python Shell be executed later
• print("Game Over")
• Writing a sample script
• print() is a built-in case-sensitive,
Python function • Saving and Running it
• Function – Mini-program that performs • game_over.py
some specific task
• arguments, return values, calls, statements, …
• Interpreting an error message
• Syntax highlighting

Nov 30, 2024 Introduction to Programming 9


print()
• Function to output content x = "Python"
• String concatenation operators y = "is"
• , (implicitly adds spaces) z = "awesome"
• + (doesn’t add spaces) print(x, y, z)
• same as arithmetic addition operator
print(x + y + z)

w = 5
print(w, x)
print(w + x)
print(x + w)
Nov 30, 2024 Introduction to Programming 10
Python Programming Development
Environments
• Command line • Spyder
• IDLE • Notepad
• Eclipse (with PyDev) • PyCharm
• Eric • Online editors
• PyScripter • http://pythonfiddle.com/
• Google Colab
• Bluefish • w3schools
• Geany • …

Nov 30, 2024 Introduction to Programming 11


Installing Python Packages
• pip
• package manager for Python packages/modules
• Installed with python

• Common pip commands


• pip list
• pip install <package-name>
• pip uninstall <package-name>

Nov 30, 2024 Introduction to Programming 12


Examining the
Game Over
Program
gameover.py
• (Quintessential) HelloWorld Program

Using Comments
• Why? Programs outlive the programmer
• Begins with #
• Meant for humans, not computers
Using Blank Lines
• Meant for humans, not computers
• Visual grouping of code
Printing the String
Waiting for the User

Nov 30, 2024 Introduction to Programming 13


Administrative aspects
• Contact hours • Lecture feedback (Anonymous)
• Two sessions on each of these days • https://forms.gle/veoUaHCwE4DG9
• Nov 30 LRq5
• Dec 6-7 and 9-10
• Instructors
• Pre-mid-term: Tamal Das
• Post-mid-term: Subhajit Datta
• Evaluations (Till Mid-term)
• Assignment (10%)
• Mid-term Exam (40%)

Nov 30, 2024 Introduction to Programming 14


Course Objectives
• To understand main control structures of procedural programming
languages
• To provide a practical introduction to Python programming language
• Developing comprehensive knowledge about the fundamental
principles, concepts, and constructs of modern computer
programming.
• Developing competencies for the design, coding, and debugging of
computer programs.

Nov 30, 2024 Introduction to Programming 15


Course Learning Outcomes
• Design and implement programs to solve simple problems
• Use those programs in the data processing programming environment
• Demonstrate the ability to correct, test, and debug data processing
programs
• Apply the theoretical knowledge in practice

Nov 30, 2024 Introduction to Programming 16


Course Outline (Pre-mid-sem)
• Module I: Computer Programming- Basic Building Blocks
• This module explains the basic concepts related to programming including
concepts related to variables, operations, data types, control structures &
loops.
• Module II: Data Structures in Python
• This module explains the basic concepts related to Functions and Lists.

Nov 30, 2024 Introduction to Programming 17


Textbooks & Software

Textbook Software
• Title • Python 3
• Python Programming for the
Absolute Beginner
• Author
• Michael Dawson
• Publisher
• CENAGE
• ISBN
• 9789386668004
Nov 30, 2024 Introduction to Programming 18
Session Plan
Case /
Module Session Exercise /
No. No. Topic and Sub-topics Readings Assignment
Solving Problems using Computers Algorithms
Chapter 1 (Textbook)
1 Object-Oriented Programming vs. Sequential Programming Lecture notes
Basic Python Programming by Examples
Variables and Data Types
Arithmetic Operators and Expressions Chapter 2 (Textbook)
2
1 Strings Lecture notes
Getting User Input and writing output
Control statements and program development
Boolean Expressions Chapter 3 (Textbook)
3-4
Simple Decisions Lecture notes
Chained & Nested Decisions
5 Loops Chapter 3 (Textbook)
Lecture notes
2 6-7 Functions (void and return) Chapter 6 (Textbook)
8 Sequences: Lists Lecture notes
9-10 Single and Multidimensional Arrays and Use Cases Lecture notes
Mid-term

Nov 30, 2024 Introduction to Programming 19


Summary
• Python and its strengths
• Installation
• HelloWorld
• Python IDLE Modes
• Write, Edit, Save, Run Python Programs
• Fetching user input

Nov 30, 2024 Introduction to Programming 20

You might also like