Introduction to Problem Solving with Computers Using Python Programming
This course will introduce you to problem-solving using programming. Beginning with simple tasks like evaluating mathematical expressions, calculating income-tax, to solving JEE problems (maths, physics, chemistry), we will gradually move on to engineering problems from all branches of engineering (mechanical, electrical, mechatronics, computer). We will focus on building logic, learning design patterns such as modularity, establishing program correctness, debugging, testing, and efficiency.
https://web.stanford.edu/class/cs109/handouts/honorCode.html
- Rule 1: You must not look at solutions that are not your own.
- Rule 2: You must not share your solutions with other students.
- Rule 3: You must indicate on your submission any assistance you received.
- Rule 4: Don't ask an LLM/Google/ChatGpt/Gemini etc. to solve homework for you
- Please be aware: all submissions are subject to automated plagiarism detection
- Discuss ideas together, but do the coding on your own... Perhaps the only way you may fail this course is by engaging in dishonesty
Monday: 9:30 am-10:25 am -- Lecture 1 -- LH300
Thursday: 9:30 am-10:25 am -- Lecture 2 -- LH300
Tuesday: 8:30 am to 9:30 am Tutorial for entire class -- LH300
Labs are in ED1
Tuesday ---> Batch 2 (ED1 Room 320) and Batch 6 (ED1 room 312)
Wednesday ---> Batch 3 (ED1 Room 106) and Batch 5 (ED1 room 312)
Thursday ----> Batch 4 (ED1 Room 106) and Batch 1 (ED1 room 312)
Ed1 room 312 has a capacity of 32. First 32 students on Batches 6,5 and 1 can be seated in ED1 room 312 while others can be seated in TL1 (Ed1 room 106). Eventually, the ED1 room 312 may be used for students that need more help in the respective batches for the day.
Office Hours* During office hours, you can meet the instructor and ask your questions, doubts etc. Friday, ED1 Room 312 (12:30 p.m. - 1:30 p.m.)
After Hours Lab Timings and Volunteers
Day | Start Time | End Time | Name |
---|---|---|---|
Monday | 6:00 PM | 8:00 PM | Ishaan Shukla |
Tuesday | 11:30 AM | 1:30 PM | Sharvari |
6:00 PM | 8:00 PM | Shaoni | |
Wednesday | 11:30 AM | 1:30 PM | Sandeep Mohan |
6:00 PM | 8:00 PM | Remalya | |
Thursday | 10:00 AM | 12:00 PM | Hetvi |
6:00 PM | 8:00 PM | Fenil Devganiyab | |
Friday | 2:00 PM | 4:00 PM | Hasanna |
6:00 PM | 8:00 PM | Prasanna | |
Saturday | 9:30 AM | 11:30 AM | Dheeraj |
11:30 AM | 1:30 PM | Siddhant Pinetar | |
2:00 PM | 4:00 PM | Daya | |
4:00 PM | 6:00 PM | Ananya | |
6:00 PM | 8:00 PM | Jaswanth | |
Sunday | 2:00 PM | 5:00 PM | Abdul Karim |
6:00 PM | 6:00 PM | Divyansh |
- What is Computer Science?
- Can all problems be solved by computers? Undecidability, Halting problem
- Algorithms: pseudocode, flowcharts
- Limitations of computers
- Lab: scratch programming
- Types of Programming Languages
- Interpreters vs Compilers
- Flowgorithm
- Conditional Statements:
if
,if-else
,elif
- Loops:
for
,while
- Why Python?
- Lab: Flowgorithm
- Math for computer scientists: PMI
- Practice with algorithm development
- Imperative model of computing
- Functional model of computing
- Lab: Turtle graphics, game development in Python, Python basics
- Python installation & syntax
- Python IDEs: Jupyter Notebook, Spyder, VS Code, PyCharm
- Virtual Environment in Python
- Variables and Keywords
- Data types overview
- Operators:
- Arithmetic
- Relational
- Logical
- Assignment
- Membership
- Identity
input()
andprint()
- Comments and indentation
- Common File Extensions
.png
,.jpg
,.csv
,.txt
,.py
,.ipynb
, etc. - Data Types
int()
,float()
,str()
,bool()
, etc.
- Creating strings and using methods:
upper()
,lower()
,find()
,replace()
, slicing, etc. - String formatting: f-strings,
.format()
- Escape characters & raw strings
- Formatted input
- Number Systems
Binary, Decimal, Hexadecimal, Octal - ASCII & Unicode
- Type Casting
- Loop controls:
break
,continue
,pass
range()
function- Nested loops
- Simple pattern printing
- List operations and methods
- Nested lists
- Tuples and immutability
- Tuple unpacking
- Memory representation: list vs tuple
- List comprehension
- Set operations: union, intersection, difference
- Set methods
- Dictionary creation, access, and methods
- Looping through dictionaries
- Nested dictionaries
get()
,setdefault()
,fromkeys()
methods
- Defining functions
- Parameters and return values
- Default & keyword arguments
- Variable-length arguments:
*args
,**kwargs
- Scope: local vs global
- Recursion basics and examples
- List, Set, Dictionary comprehensions
- Shallow Copy vs Deep Copy:
copy()
anddeepcopy()
- Comparison:
is
vs==
- Memory allocation:
id()
, mutability del
statement
- Built-in functional tools:
map()
,filter()
,reduce()
- Lambda expressions
- Intro to popular libraries:
numpy
,pandas
,matplotlib
- Importing modules:
import
,from
- Built-in modules:
math
,random
,datetime
- Writing your own module
- Classes and Objects
__init__
methodself
and instance attributes- Encapsulation and abstraction
- Inheritance: single, multiple
- Method overriding
- Composition
open()
,read()
,write()
,close()
- File modes:
r
,w
,a
,rb
, etc. - Exception handling:
try
,except
,finally
,raise
- Basic commands:
ls
,cd
,pwd
,mkdir
,rm
,touch
,cat
- File permissions:
chmod
,chown
- Piping & redirection
- Navigating folders and environment variables
- Using GitHub Copilot and AI tools
- Introduction to LLMs (Large Language Models)
- Prompt engineering for coding tasks
- Algebra and Numerical Analysis:
- Automatic Differentiation
- Integration
- System of Linear Equations:
- Gaussian Elimination (with code)