Introduction to Programming with Python Notes | B.Sc. (Computer Science) Semester 1 | Mumbai University | munotes
Official Notes munotes.in
Introduction to Programming with Python
B.SC. (COMPUTER SCIENCE) · SEMESTER 1
Strictly as per the University of Mumbai NEP syllabus in force for B.Sc. (Computer Science)
For B.Sc. (Computer Science) students of the University of Mumbai and all its affiliated colleges
Open the book ↓munotes.in First Year
Contents
Module I Overview and basic elements, control statements, arrays, functions and strings
- What Python Is, and the Features That Made It Popular 1
- Installing Python and Running Your First Program 7
- How a Python Program Is Executed: Source, Bytecode and the PVM 11
- The Flavours of Python 15
- The Python Interpreter: The Prompt and the Command Line 18
- Comments and Docstrings 22
- IDLE: Python's Own Editor and Shell 26
- The Data Types Python Gives You 30
- Dictionaries, Sets and Mappings: A First Look 35
- The Basic Elements of a Python Program 39
- Variables and How Python Stores a Value 44
- Reading Input: The input() Function 48
- Printing Output: The print() Function 52
- Command Line Arguments 56
- Operators, Part One: Arithmetic, Relational and Logical 59
- Operators, Part Two: Bitwise, Assignment, Membership and Identity 63
- Precedence and Associativity of Operators 68
- The if Statement 73
- The if...else Statement 77
- The if...elif...else Statement 80
- The while Loop 84
- The for Loop and range() 88
- Infinite Loops and Nested Loops 92
- The else Suite on a Loop 97
- break, continue and pass 100
- The assert Statement 104
- The return Statement 108
- Arrays: Creating Them with the array Module 112
- Indexing and Slicing an Array 116
- Basic Array Operations and Array Processing 120
- Mathematical Operations on an Array with NumPy 125
- Aliasing, Viewing and Copying an Array 129
- Slicing and Indexing a NumPy Array 134
- Advanced Indexing: Integer Arrays and Boolean Masks 138
- The Dimensions and Attributes of an Array 143
- Defining a Function and Calling It 148
- Returning Results, and Returning More Than One 152
- The Built-in Functions 156
- A Function and a Method: The Difference 160
- How Python Passes a Value: Object Reference 164
- Parameters and Arguments 168
- Recursive Functions 172
- Anonymous Functions: lambda 177
- Modules in Python 181
- Creating Strings 186
- The Functions and Methods of a String 190
- Working with Strings 194
- Formatting Strings 198
- Counting Characters and Words in a String 202
- Inserting a Substring into a String 206
- Module 1 Practicals: The Programs for Your Journal 210
Module II Lists, tuples and dictionaries, files, regular expressions, and date and time
- Lists: What They Are and How to Make One 217
- List Functions and Methods 222
- List Operations 226
- List Slices 231
- Nested Lists, and the Matrix 235
- Tuples 240
- The Functions That Work on a Tuple 244
- Creating a Dictionary 248
- Operators in a Dictionary 253
- Dictionary Methods 257
- Looping Over a Dictionary 261
- Operations on Dictionaries 265
- Opening and Closing a File 269
- Working with Text Files 273
- The with Statement 277
- Working with Binary Files 281
- Pickle: Storing an Object in a File 285
- seek() and tell(): Where You Are in a File 290
- Random Access to a Binary File 295
- Zipping and Unzipping Files 300
- Working with Directories 305
- Regular Expressions: What They Are and Why 310
- Sequence Characters in a Regular Expression 315
- Special Characters in a Regular Expression 320
- Using a Regular Expression on a File 325
- Retrieving Information from an HTML File 330
- Time in Python 335
- Dates 339
- The Date and Time Now, and Combining Them 343
- Formatting a Date and a Time 347
- Finding and Comparing Dates 352
- Sorting Dates 357
- Knowing the Time a Program Takes 362
- Working with the Calendar Module 367
- Module 2 Practicals: The Programs for Your Journal 373
- The Practical Examination, the Journal and the Viva 383
The chapters
Every chapter of this book comes with the B.Sc. (Computer Science) Semester 1 notes.
The cover and the contents are free to look through. Buy the notes once to read every chapter of every subject in this semester.
Notes: ₹499 Already bought it? Sign in
Free either way: question papers, the syllabus, and the cover and contents of every book.
The rest of this subject
These notes are cut from the University's printed syllabus. Open the syllabus itself for the same subject.