0% found this document useful (0 votes)
5 views13 pages

Python Full Course Ipad Notes

This document provides a comprehensive beginner-friendly Python course outline, including lectures on variables, data types, loops, functions, and object-oriented programming. Each section contains key concepts, code examples, and mini-practice exercises to reinforce learning. Additionally, it includes a final revision sheet and a 7-day study plan to guide learners through the material.

Uploaded by

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

Python Full Course Ipad Notes

This document provides a comprehensive beginner-friendly Python course outline, including lectures on variables, data types, loops, functions, and object-oriented programming. Each section contains key concepts, code examples, and mini-practice exercises to reinforce learning. Additionally, it includes a final revision sheet and a 7-day study plan to guide learners through the material.

Uploaded by

yashb.hestabit
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

PYTHON FULL COURSE

Beginner-Friendly iPad Study Notes


How to use these notes
Read one lecture at a time. Type every code example yourself. After each lecture, complete the mini-practice and revise the quick
sheet.

Course source: YouTube playlist PLGjplNEQ1it8-0CmoljS5yeV-GlKSUEt0

Table of Contents
 Lecture 1 - Variables, Data Types, Input, Operators
 Lecture 2 - Strings and Conditional Statements
 Lecture 3 - Lists and Tuples
 Lecture 4 - Dictionaries and Sets
 Lecture 5 - Loops in Python
 Lecture 6 - Functions and Recursion
 Lecture 7 - File Input/Output
 Lecture 8 - OOP: Classes and Objects
 Lecture 9 - OOP Part 2: Inheritance, Encapsulation, Polymorphism
 Final Revision Sheet and 7-Day Study Plan

Python iPad Study Notes - Beginner Friendly


Lecture 1 - Variables, Data Types, Input, Operators
Learning Goal
Understand how Python stores values, displays output, takes input, and performs basic operations.

Key Concepts
 Python is a high-level language with simple syntax.
 A variable is a name used to store data.
 Python automatically understands the data type from the value.
 input() always returns text/string, so convert it when you need numbers.

Code Examples
Hello World
print("Hello World")

Variables
name = "Yash"
age = 22
height = 5.9
is_adult = True

print(name)
print(age)

Input with type conversion


a = int(input("Enter first number: "))
b = int(input("Enter second number: "))

print("Sum:", a + b)

Operators
a = 10
b=3

print(a + b) # addition
print(a - b) # subtraction
print(a * b) # multiplication
print(a / b) # division
print(a % b) # remainder
print(a ** b) # power

Mini Practice
1. Create variables for your name, age, city, and course, then print them.
2. Take two numbers from the user and print addition, subtraction, multiplication, and division.
3. Take age as input and print whether age is greater than 18 using a comparison operator.
Remember
Do not only read the code. Type it yourself, run it, then change values to test your understanding.

Python iPad Study Notes - Beginner Friendly


Lecture 2 - Strings and Conditional Statements
Learning Goal
Work with text and write decision-making programs using if, elif, and else.

Key Concepts
 A string is text written inside quotes.
 Indexing starts from 0.
 Slicing extracts a part of the string.
 Conditional statements let your program make decisions.

Code Examples
String basics
name = "Python"

print(name[0]) #P
print(name[1]) #y
print(name[0:3]) # Pyt
print([Link]())
print([Link]())

if-else
age = int(input("Enter your age: "))

if age >= 18:


print("You can vote")
else:
print("You cannot vote")

Marks grading
marks = int(input("Enter marks: "))

if marks >= 90:


print("Grade A")
elif marks >= 75:
print("Grade B")
elif marks >= 50:
print("Grade C")
else:
print("Fail")

Mini Practice
4. Ask the user for their name and print the first and last character.
5. Create a grading system using marks.
6. Check whether a number is positive, negative, or zero.
Remember
Do not only read the code. Type it yourself, run it, then change values to test your understanding.

Python iPad Study Notes - Beginner Friendly


Lecture 3 - Lists and Tuples
Learning Goal
Store multiple values using lists and tuples.

Key Concepts
 List is ordered, mutable, and allows duplicate values.
 Tuple is ordered, immutable, and allows duplicate values.
 Use lists when data may change; use tuples when data should stay fixed.

Code Examples
List basics
marks = [90, 85, 76, 60]

print(marks[0])
marks[0] = 95
[Link](88)
[Link]()
print(marks)

List slicing
nums = [10, 20, 30, 40, 50]

print(nums[1:4])
print(nums[:3])
print(nums[2:])

Tuple basics
tup = (1, 2, 2, 3)

print(tup[0])
print([Link](2))
print([Link](3))

Mini Practice
7. Make a list of your 3 favorite movies using input().
8. Store marks of 5 subjects and print the average.
9. Create a tuple of 5 numbers and count how many times a number appears.
Remember
Do not only read the code. Type it yourself, run it, then change values to test your understanding.

Python iPad Study Notes - Beginner Friendly


Lecture 4 - Dictionaries and Sets
Learning Goal
Store key-value data using dictionaries and unique values using sets.

Key Concepts
 Dictionary stores data in key-value pairs.
 Use keys to access values.
 Set stores unique unordered values.
 Set operations like union and intersection are useful for comparison.

Code Examples
Dictionary basics
student = {
"name": "Yash",
"age": 22,
"course": "Python"
}

print(student["name"])
print([Link]("age"))
student["city"] = "Noida"
print(student)

Dictionary loop
for key, value in [Link]():
print(key, value)

Set basics
nums = {1, 2, 3, 3, 4}
print(nums)

a = {1, 2, 3}
b = {3, 4, 5}
print([Link](b))
print([Link](b))

Mini Practice
10. Create a student dictionary with name, age, marks, and city.
11. Create a set of repeated subjects and print unique subjects.
12. Find common values between two sets.
Remember
Do not only read the code. Type it yourself, run it, then change values to test your understanding.

Python iPad Study Notes - Beginner Friendly


Lecture 5 - Loops in Python
Learning Goal
Repeat code using while loops, for loops, range(), break, and continue.

Key Concepts
 while loop runs while a condition is true.
 for loop iterates over a sequence.
 range() generates numbers.
 break stops the loop; continue skips the current iteration.

Code Examples
while loop
i=1

while i <= 5:
print(i)
i += 1

for loop
nums = [1, 2, 3, 4]

for num in nums:


print(num)

range
for i in range(1, 6):
print(i)

Multiplication table
num = int(input("Enter number: "))

for i in range(1, 11):


print(num, "x", i, "=", num * i)

Mini Practice
13. Print numbers from 1 to 100.
14. Print the multiplication table of any number.
15. Print only even numbers from 1 to 50.
16. Use break to stop a loop when a number becomes 5.
Remember
Do not only read the code. Type it yourself, run it, then change values to test your understanding.

Python iPad Study Notes - Beginner Friendly


Lecture 6 - Functions and Recursion
Learning Goal
Create reusable code blocks and understand function calls.

Key Concepts
 A function is a reusable block of code.
 Parameters send data into a function.
 return sends a value back from a function.
 Recursion means a function calls itself; it must have a base case.

Code Examples
Function basics
def greet():
print("Hello")

greet()

Function with parameters


def add(a, b):
return a + b

result = add(10, 20)


print(result)

Default parameter
def greet(name="User"):
print("Hello", name)

greet()
greet("Yash")

Recursion factorial
def factorial(n):
if n == 0 or n == 1:
return 1
return n * factorial(n - 1)

print(factorial(5))

Mini Practice
17. Create a function to calculate square of a number.
18. Create a function to calculate average of 3 numbers.
19. Write a recursive function to print numbers from n to 1.
Remember
Do not only read the code. Type it yourself, run it, then change values to test your understanding.

Python iPad Study Notes - Beginner Friendly


Lecture 7 - File Input/Output
Learning Goal
Read, write, append, and delete files using Python.

Key Concepts
 File handling lets Python work with text files.
 r mode reads, w mode writes and overwrites, a mode appends.
 with open() is best because it closes the file automatically.
 Use [Link]() to delete a file.

Code Examples
Read file
with open("[Link]", "r") as file:
data = [Link]()
print(data)

Write file
with open("[Link]", "w") as file:
[Link]("Hello Python")

Append file
with open("[Link]", "a") as file:
[Link]("\nNew line added")

Delete file
import os

[Link]("[Link]")

Mini Practice
20. Create a file named [Link] and write your name and course.
21. Read the file and print its content.
22. Append one more line to the file.
23. Try reading line by line using readline().
Remember
Do not only read the code. Type it yourself, run it, then change values to test your understanding.

Python iPad Study Notes - Beginner Friendly


Lecture 8 - OOP: Classes and Objects
Learning Goal
Understand class, object, constructor, self, attributes, and methods.

Key Concepts
 OOP means Object-Oriented Programming.
 A class is a blueprint.
 An object is created from a class.
 __init__ is a constructor that runs when object is created.
 self refers to the current object.

Code Examples
Class and object
class Student:
name = "Yash"

s1 = Student()
print([Link])

Constructor
class Student:
def __init__(self, name, age):
[Link] = name
[Link] = age

s1 = Student("Yash", 22)
print([Link])
print([Link])

Methods
class Student:
def __init__(self, name):
[Link] = name

def greet(self):
print("Hello", [Link])

s1 = Student("Yash")
[Link]()

Mini Practice
24. Create a Car class with brand and color.
25. Create a method to display car details.
26. Create a Student class with name and marks, then create two objects.
Remember
Do not only read the code. Type it yourself, run it, then change values to test your understanding.

Python iPad Study Notes - Beginner Friendly


Lecture 9 - OOP Part 2: Inheritance, Encapsulation, Polymorphism
Learning Goal
Learn advanced OOP ideas used in real projects.

Key Concepts
 Encapsulation means keeping data and methods together.
 Private-like attributes use double underscore.
 Inheritance allows a child class to use parent class features.
 Polymorphism means same operation behaves differently.
 super() calls parent class constructor or method.

Code Examples
Encapsulation
class Account:
def __init__(self, balance):
[Link] = balance

def deposit(self, amount):


[Link] += amount

def show_balance(self):
print("Balance:", [Link])

Inheritance
class Animal:
def speak(self):
print("Animal speaks")

class Dog(Animal):
def bark(self):
print("Dog barks")

d = Dog()
[Link]()
[Link]()

Method overriding
class Animal:
def sound(self):
print("Animal sound")

class Dog(Animal):
def sound(self):
print("Bark")

d = Dog()
[Link]()

super
class Car:
def __init__(self, car_type):

Python iPad Study Notes - Beginner Friendly


self.car_type = car_type

class Toyota(Car):
def __init__(self, name, car_type):
super().__init__(car_type)
[Link] = name

car = Toyota("Fortuner", "Diesel")


print([Link])
print(car.car_type)

Mini Practice
27. Create a BankAccount class with deposit and withdraw.
28. Create parent class Vehicle and child class Bike.
29. Override a method in child class.
30. Use super() in a child class constructor.
Remember
Do not only read the code. Type it yourself, run it, then change values to test your understanding.

Python iPad Study Notes - Beginner Friendly


Final Revision Sheet
Last-minute revision rule
Before moving to projects, you should be able to write each of these examples without looking.

Print
print("Hello")

Variable
x = 10
name = "Yash"

Input
age = int(input("Enter age: "))

if-else
if age >= 18:
print("Adult")
else:
print("Minor")

List
items = [1, 2, 3]
[Link](4)

Dictionary
student = {"name": "Yash", "age": 22}
print(student["name"])

Loop
for i in range(5):
print(i)

Function
def add(a, b):
return a + b

Class
class Student:
def __init__(self, name):
[Link] = name

Beginner Projects
Project 1 - Calculator
Take two numbers as input and show addition, subtraction, multiplication, and division.

Project 2 - Student Marks System


Take marks as input and print grade using if-elif-else.

Project 3 - To-Do List


Use a list and while loop to add tasks until the user types quit.

Project 4 - Bank Account


Python iPad Study Notes - Beginner Friendly
Use OOP to deposit, withdraw, and show balance.

7-Day Study Plan


Day Topic Task
Day 1 Lecture 1 Variables, data types, input, operators
Day 2 Lecture 2 Strings, slicing, conditions
Day 3 Lectures 3-4 Lists, tuples, dictionaries, sets
Day 4 Lecture 5 Loops and pattern/table practice
Day 5 Lecture 6 Functions and recursion
Day 6 Lecture 7 File handling
Day 7 Lectures 8-9 OOP + one small project

Python iPad Study Notes - Beginner Friendly

You might also like