
Create a python script in Notepad and save it as a .py file. Then set the path variable and execute the script from the command prompt.
Open Python IDLE to write and run scripts, use the editor’s color coding and auto fill, save as sample, and run with F5 to see hello world.
Practice chapter 1 lab exercises and solutions in Python by writing programs that print arithmetic outputs like one plus two equals three and display a welcome message.
Explore variables in Python, learn how memory stores values, and understand five standard data types: numbers, strings, list, double, and dictionary, with their structures.
Explore Python strings by defining and printing strings, indexing to access characters, slicing subranges, concatenating strings, repeating, and building simple programs that display hello world.
Explore Python lists as versatile data structures, using stack semantics with last in, first out, and practice indexing, slicing, concatenation with the plus operator, and insert operations.
Explore tuples in Python as immutable sequences using parentheses, unlike lists, with indexing, printing elements, handling index errors, and concatenating or repeating tuples.
Master Python tuples by writing a program that prints values from one to five and demonstrates joining elements, reinforcing basic tuple operations.
Explore Python data types, including booleans, integers, long integers, floats, complexes, strings, bytes, and sets, and understand mutable versus immutable behavior.
Explore the boolean data type, its two values true and false, as a special case of the logic data type. See an example that prints booleans to demonstrate their behavior.
Explore integer data types, whole numbers, and not fractions, by implementing a program that multiplies the number of baskets by apples per basket to print the total apples.
Learn Python tuples through indexing, slicing, concatenation with the plus operator, repetition with the asterisk, membership tests, and min and max.
Explore lists in Python, a versatile data type written as square brackets with comma separated items. Learn indexing, slicing, length, and appending by building and printing list elements.
Explore Python sets as unordered collections of unique elements, demonstrating removal of duplicates, membership tests, and set operations like intersection, union, difference, and symmetric difference with practical examples.
Explore arithmetic operators, including addition, subtraction, multiplication, division, modulus, exponentiation, and floor division, with examples using operands.
Understand how operator precedence determines which Python operations execute first, how parentheses override order, and how left-to-right evaluation shapes expressions, illustrated with a concrete example.
Explore global and local variable scopes and how each identifier is accessible in a program by using a simple sum function with local and global totals to illustrate scope.
Explore Python basics with chapter two lab exercises on declaring two elements, summing, printing, multiplying numbers, and computing powers.
Explore conditional statements and the if statement in Python, learning how conditions control program flow, execute blocks when true, and use else and else if branches.
Define an age variable and use an if statement to print a message when age is greater than or equal to 22, otherwise print a message, to demonstrate conditional execution.
Explore if statements and elif chains to evaluate conditions and execute corresponding blocks, with else handling the default path when no conditions match.
See how if, elif, and else control flow decide outcomes for values like 200 and 150, print results, and cover default cases.
Explore switch statements and how a variable is tested for equality against a list of values across multiple test cases.
Learn the Python one-line if statement: use expression1 if condition else expression2; evaluate the condition first, returning the true expression or the else expression with an example.
Learn how to implement one line if statements in Python, using age-based conditions to print kid, teenager, or adult, and compress the if else into a single line.
Students write a Python script in an editor to read a number, use if number >= 0 to print positive number, else print negative number.
Learn how to write a Python program that checks leap years by testing divisibility by 4, 100, and 400, using user input and conditional statements.
Demonstrates Python if statements by checking for 100 and printing 'value is 100' or 'goodbye', and shows that 200 makes the condition unsatisfied so the statement doesn't execute.
Demonstrates Python if else statements by evaluating a variable against 1 and printing messages to reveal the execution flow in chapter 3 lab exercise example 5.
Learn how while loops repeat code while a boolean condition is true, as a control flow statement. See the syntax and how the loop ends when the condition becomes false.
Learn how a while loop increments a counter to avoid infinite loops, using a condition count < 9, printing each count, and exiting when nine is reached.
Learn how for loops iterate over strings and lists by printing each element. See practical examples with letters and a fruit list to understand indexing and traversal.
Explore exception handling in Python by using try, except, and finally blocks to manage errors that disrupt program flow and implement robust error responses.
Explore break and continue statements in Python, including labeled and unlabeled forms, how continue skips the current iteration, and how break terminates loops or switch-like constructs.
Explore how the continue statement affects loop control by skipping the rest of the current iteration and jumping to the next, with conditional examples and expected outputs.
Learn how to determine prime numbers with a Python program and compare looping techniques, including for and while loops. The example checks factors and lists primes from 10 to 20.
Master counting from zero to ten with a loop: initialize count to zero, test count < 10, increment with count += 1, and print each value from zero to ten.
Explore a Python lab exercise that reads user input, validates it as an integer, raises a value error on invalid input, and repeats until a valid number is entered.
Initialize a counter to zero, loop while the counter is less than three, print the counter, and increment the counter to complete the example.
the lecture demonstrates writing a Python program with a while loop that runs infinitely, uses a condition equal to 1, and shows how to exit with control-C by interrupt.
Learn to implement a counting loop in Python using a while loop, printing each count and incrementing by 1 until it exceeds N, as demonstrated in chapter 4 example 7.
Explore how Python lists use square brackets and comma-separated items to store multiple data types, with examples showing integers and strings together.
Learn how to modify lists by updating and deleting elements, using built-in functions and methods like append, count, extend, insert, remove, reverse, and sort, plus length, max, and min operations.
Define lists with strings and numbers, access elements by zero-based indexing, and slice list2 from index 1 to 5 to print specific values, illustrating Python list operations.
Update values in the list and print the value at index 2 as you modify the list. Display the updated value 2001 after replacing 1997.
Demonstrate deleting the second element from a Python list and printing the list before and after modification, illustrating list editing and indexing.
Define a list and apply the sort function to arrange its string elements alphabetically by their first character, then print the sorted list for verification.
Practice deleting elements from a list and observe the before and after states, including updated indices and printed results, using defined elements and print statements.
Create an empty list, append two strings, lion and tiger, and print the final list length to show how the length equals two elements.
Explore membership tests in Python lists using the in and not in checks to drive if-else outputs. Demonstrate printing results based on whether items exist in the list.
Learn how to read user input in Python with the input function and a prompt, which reads a line, strips the newline, converts it to a string, and returns it.
Write a Python program that reads a letter from the console into s and uses an if statement to print a message when s equals a.
Press any key to continue is demonstrated in Python by a program that imports modules, prints the prompt, and uses a try and finally block to capture the key press.
Practice using input to accept values, store them in a variable, and print the received input in chapter 6 lab exercises and solutions.
Write a Python program that reads two numbers from the user, converts input from string to integer, and prints the sum of the two numbers.
Explore strings as objects in Python, using the string module to represent sequences of characters and create class objects to structure programs with consistency.
Explore a simple Python example that defines a class and a function, demonstrates strings as objects and concatenation, and runs without error to build familiarity with object oriented programming.
Learn string operations in Python by splitting and joining strings using the split and join functions, and explore how one string can be divided or combined to form new strings.
Learn to split a string into a list and join the list back into a string. View the string as an object with methods and basic object oriented concepts.
Explore chapter 7 lab exercises and solutions by updating a string, slicing from index 0 to 7, and appending another string with the concatenated string operator in Python.
Learn how Python functions separate tasks into built-in and user-defined types, create with def, pass arguments, write a docstring, define a function body, and return values.
Learn how to define and call functions in Python using the def keyword, pass strings as input, and reuse a single function to process varying inputs.
Explore defining a function with parameters, passing a list as an argument, and using a reverse function to manipulate and print the list.
This lecture explains how Python functions receive arguments, perform add and subtract operations, print results, and return values to the caller, with formatting examples.
Learn to create a two-argument multiplication function, print results, and return values, then debug highlights like misspelled keywords and interpreter errors to reinforce stepwise execution.
Demonstrate printing each person's height, weight, and IQ by using variables, extending the code, and invoking a function call in a Python example.
Learn to pass two arguments to a function, including an age parameter, and perform arithmetic like multiply and divide with Python interpreters.
Learn how to define and call a function in Python through a simple lab example. See the function called twice and the resulting output, including a print call.
Explore default arguments in Python by defining a function that prints a student and class with a default value of 10, and observe overrides when class is set to 7.
Explore predicting Python program output by tracing a function that sums values with a for loop, a zero-initialized variable, and a docstring, and then printing the results.
Explore how a class groups similar items into objects, using birds like peacock, crow, and pigeon, books as items, and a car with brands as its objects.
Objects are the basic units of object oriented programming, identified by their unique name, representing a particular instance of a class, with multiple instances and each holds its own data.
Learn how a method, a program procedure defined in a class, uses properties and the date keyword to add features like showing the current time within object oriented programming.
Explore defining a Python class with the class keyword, adding attributes and methods, using a docstring, implementing a constructor, and displaying employee data via the dot operator.
Define a class, print its docstring and attributes, and inspect class metadata such as module, name, and the internal dictionary to understand Python class objects.
Learn how methods function as class members, explore alternate methods that control class–function relationships, and see an example where a class instance is the first parameter.
Define a class C and call its method using the class, illustrating a simple Python example where no instance is required.
Explore how object data provides an abstraction for data, with programs represented by objects or relationships between objects, and learn the two types of objects: instance objects and class objects.
Define an account class in Python, implement deposit, withdraw, and balance methods using self, and use pass as placeholders for unfinished functions.
Explore how a child class inherits properties from a base class in Python, acquiring attributes and functions to form a subclass.
Explore object oriented programming by building a clock class in Python, creating instances, and implementing time advancement logic for seconds, minutes, and hours with clear display formatting.
Explore chapter 9 lab exercises and solutions by building a bank account program with classes and objects, implementing constructor, deposit, balance methods, and creating instances to manage balances.
Define a rational number class with numerator and denominator, initialize its attributes, and implement arithmetic operators including multiplication and division, plus a display method to show results.
Define a rational number class, create two objects r1 and r2, and print the display to verify the class behavior in chapter 9 example 2 part 2.
Learn to open files in Python using the open function, specify the filename and access mode (read or write), and control buffering settings.
Open a text file by creating it automatically when it doesn't exist, using a file object and the open function, and print the resulting file name in the working directory.
Learn how to open files in Python, inspect the file mode, and use the file object's closed attribute to verify if the file is closed.
Learn how to read text in Python by opening a file, reading its contents, printing them, and closing the file, including handling file not found errors.
Learn to write text to a file in Python by using the file object's write method, handling both text and binary data and passing strings to write.
Open a file for writing, write a string, and run the code to see the output in this Python tutorial.
Learn how to read and write binary files in Python using the open function in binary mode, and understand handling binary data.
Open a file with a Python file object, print the file name, and check if it is open or closed in binary mode, as shown in lab exercises example 1.
Learn to read and write to a file in Python through a lab exercise by prompting for a filename, truncating content, writing three lines, and then reading back the result.
Learn practical file operations in Python by creating, erasing, truncating, writing to, and closing text files, then verify the file contents after each edit.
WHAT IS THIS COURSE ABOUT?
This course start with basics of Python programming language and takes you up to Intermidiate level.
It will make you self sufficient in programming so that not only you become Expert Python but also give you insights to learn any language quickly and easily.
Lot of examples in each chapter with explanations.
WHAT IS GOING TO BE COVERED IN THIS COURSE?
Main topics to be introduced in this course as follows:
WHY TAKE THIS COURSE?
Very importantly, this course aims to cover the basics of Python to teach coding to everybody.
You don't need to be developer to take this course.
It gives you complete exposure of Python with examples to understand it thoroughly.
The use of Python will make your scripting or computations or the development of the tools which you need to implement quite fast and easy.
Lot of Lab Exercises and Solutions in every chapters with explanations which helps you to understand each concept thoroughly.