From af757791142e70cb2d869d0e9b640439d5224bb6 Mon Sep 17 00:00:00 2001 From: RIHAN MAHAMADASIF BAGWAN Date: Mon, 29 Dec 2025 21:40:19 +0530 Subject: [PATCH 01/34] Revise README for clarity and status update Updated the README to reflect the purpose of the repository and added a status section. --- README.md | 129 +++++------------------------------------------------- 1 file changed, 11 insertions(+), 118 deletions(-) diff --git a/README.md b/README.md index a9086a0..fee90e2 100644 --- a/README.md +++ b/README.md @@ -1,121 +1,14 @@ -# The Ultimate Python Course +## Python Learning & Practice Repository -Welcome to [**The Ultimate Python Course!**](https://youtu.be/UrsmFxEIp5k) +This repository is forked from CodeWithHarry's Python course. +I use it to learn Python by rewriting examples, +adding my own practice, notes, and small improvements. -This course is designed to take you from a beginner to an advanced Python programmer. The repository contains all the source code, projects, problem sets, and additional resources to supplement your learning. -This is a part of my video The Ultimate Python Couse. Refer to this [video](https://youtu.be/UrsmFxEIp5k) to watch my Python course +### What I am doing here +- Rewriting course code in my own way +- Adding comments and explanations +- Creating small practice programs +- Learning Git and GitHub workflow -## Table of Contents - -- [The Ultimate Python Course](#the-ultimate-python-course) - - [Table of Contents](#table-of-contents) - - [Introduction](#introduction) - - [Chapters](#chapters) - - [Projects](#projects) - - [Problem Sets](#problem-sets) - - [Additional Resources](#additional-resources) - - [How to Use This Repository](#how-to-use-this-repository) - -## Introduction - -This repository is part of **The Ultimate Python Course** created by [CodeWithHarry](https://www.codewithharry.com/). The course aims to provide a comprehensive guide to learning Python programming. - -## Chapters - -The course is divided into several chapters, each focusing on different aspects of Python programming: - -- **Chapter 1: Modules, Comments & pip** - - Writing the first Python program - - Understanding modules - - Using pip for package management - - Using Python as a calculator - - Comments in Python -- **Chapter 2: Variables and Data Types** - - Defining variables - - Different data types in Python - - Rules for choosing an identifier - - Operators in Python - - Using `type()` function and typecasting - - `input()` function -- **Chapter 3: Strings** - - String slicing - - Slicing with skip values - - String functions - - Escape sequence characters -- **Chapter 4: Lists and Tuples** - - List indexing - - List methods - - Tuples in Python - - Tuple methods -- **Chapter 5: Dictionary & Sets** - - Properties of dictionaries - - Dictionary methods - - Sets in Python - - Properties and operations on sets -- **Chapter 6: Conditional Expression** - - `if`, `else`, and `elif` statements - - Relational and logical operators -- **Chapter 7: Loops in Python** - - `while` loop - - `for` loop - - `range()` function - - `for` loop with `else` - - Break, continue, and pass statements -- **Chapter 8: Functions & Recursions** - - Defining and calling functions - - Recursion in Python -- **Chapter 9: File I/O** - - Reading and writing files - - Working with directories -- **Chapter 10: Object-Oriented Programming** - - Classes and objects - - Methods and attributes -- **Chapter 11: Inheritance & More on OOPs** - - Inheritance - - Polymorphism - - Operator overloading -- **Chapter 12: Advanced Python 1** - - Newly added features in Python - - Walrus operator - - Advanced type hints - - Match case - - Dictionary merge & update operators - - Exception handling enhancements - - Global keyword and enumerate function - - List comprehensions -- **Chapter 13: Advanced Python 2** - - Virtual environments - - Lambda functions - - String methods: `join` and `format` - - Functional programming: `map`, `filter`, and `reduce` - -## Projects - -- **Project 1: Snake Water Gun Game** - - A fun and interactive game where the player competes against the computer in a variation of Rock-Paper-Scissors. -- **Project 2: Guess The Number** - - A guessing game where the player tries to guess a randomly generated number within a certain range. -- **Mega Project 1: Jarvis Virtual Assistant** - - A voice assistant application capable of performing various tasks such as playing music, and providing information. -- **Mega Project 2: AI AutoReply Bot** - - An AI-based bot designed to automatically reply to messages, enhancing communication efficiency. - -## Problem Sets - -Each chapter contains problem sets to test your understanding and to practice coding. The problem sets include various challenges and exercises relevant to the chapter's content. - -## Additional Resources - -- **[Download the Handbook](https://github.com/CodeWithHarry/The-Ultimate-Python-Course/blob/main/The%20Ultimate%20Python%20Handbook.pdf)** -- **[Download the Handwritten Notes](https://www.codewithharry.com/notes)** -- **[Download the Ultimate Python Cheatsheet](https://www.codewithharry.com/blogpost/python-cheatsheet/)** - -## How to Use This Repository - -1. **Clone the repository** to your local machine using: - ```sh - git clone https://github.com/CodeWithHarry/The-Ultimate-Python-Course.git - ``` -2. **Navigate through the chapters** to find the relevant lessons and code examples. -3. **Complete the problem sets** provided at the end of each chapter to solidify your understanding. -4. **Work on the projects** to apply your knowledge in real-world scenarios. +### Status +Ongoing learning (updated weekly) From 672e4592b5607256796b8b9597bc4f0836719f69 Mon Sep 17 00:00:00 2001 From: RIHAN MAHAMADASIF BAGWAN Date: Mon, 29 Dec 2025 21:51:24 +0530 Subject: [PATCH 02/34] add my_practice folder for personal learning --- my_practice/README.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 my_practice/README.md diff --git a/my_practice/README.md b/my_practice/README.md new file mode 100644 index 0000000..ee05f86 --- /dev/null +++ b/my_practice/README.md @@ -0,0 +1,3 @@ +This folder contains my own Python practice, +rewritten examples, and experiments. + From a351798ef3d73ce9b914d87530c88d8e84533739 Mon Sep 17 00:00:00 2001 From: RIHAN MAHAMADASIF BAGWAN Date: Mon, 29 Dec 2025 22:11:08 +0530 Subject: [PATCH 03/34] Add data analysis script using loops This script demonstrates data analysis techniques using loops, including filtering high sales, cleaning data, and handling errors. --- my_practice/practice-loops | 58 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 my_practice/practice-loops diff --git a/my_practice/practice-loops b/my_practice/practice-loops new file mode 100644 index 0000000..31be453 --- /dev/null +++ b/my_practice/practice-loops @@ -0,0 +1,58 @@ +# My Data Analysis Practice: Loops +# This script shows how to process data lists using loops. + +def analyze_data(): + + # --- PART 1: The 'For' Loop (Iterating through an Array/List) --- + # Scenario: I have a list of daily sales figures. I want to print each one. + print("1. Reading Daily Sales Data:") + daily_sales = [150, 200, 350, 400, 500] + + # "sale" is a variable that holds one number at a time from the list + for sale in daily_sales: + print("Processing sale amount: $", sale) + + print("-" * 30) + + # --- PART 2: Filtering Data (Loop with Condition) --- + # Scenario: I only want to count days where sales were high (above 300). + print("2. Filtering High Sales (> 300):") + + count = 0 + for sale in daily_sales: + if sale > 300: + print("Found high sale:", sale) + count = count + 1 + + print("Total high revenue days:", count) + + print("-" * 30) + + # --- PART 3: The 'While' Loop (Data Cleaning) --- + # Scenario: removing '0' or bad data until the list is clean. + print("3. Cleaning Data (Removing Zeros):") + raw_data = [10, 0, 50, 0, 20] + + # While '0' exists inside the raw_data list, remove it + while 0 in raw_data: + raw_data.remove(0) + print("Removed a zero... Current data:", raw_data) + + print("Final Cleaned Data:", raw_data) + + print("-" * 30) + + # --- PART 4: Break and Continue --- + # Scenario: Searching for a specific error value (like -1). + print("4. searching for Errors:") + dataset = [12, 45, -1, 60, 100] + + for value in dataset: + if value == -1: + print("Error found! Corrupted data detected. Stopping analysis.") + break # Stops the loop completely + print("Checking value:", value) + +# Run the analysis function +if __name__ == "__main__": + analyze_data() From 127a5e4248b85505b0c4a6a557101aab0b571bc5 Mon Sep 17 00:00:00 2001 From: RIHAN MAHAMADASIF BAGWAN Date: Thu, 1 Jan 2026 20:59:15 +0530 Subject: [PATCH 04/34] Add Student Management System in C++ Implemented a basic Student Management System in C++ that allows adding and displaying student information. --- my_practice/Student Management System.cpp | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 my_practice/Student Management System.cpp diff --git a/my_practice/Student Management System.cpp b/my_practice/Student Management System.cpp new file mode 100644 index 0000000..c49bf2f --- /dev/null +++ b/my_practice/Student Management System.cpp @@ -0,0 +1,29 @@ +// Student Management System (C++) +// Compile: g++ main.cpp -o main +// Run: ./main + +#include +#include +#include + +using namespace std; + +class Student { + string name; + int rollNo; +public: + Student(string n, int r) : name(n), rollNo(r) {} + void display() { + cout << "Name: " << name << " | Roll: " << rollNo << endl; + } +}; + +int main() { + vector db; + db.push_back(Student("Alex", 101)); + db.push_back(Student("Sam", 102)); + + cout << "--- Student Database ---" << endl; + for(auto &s : db) s.display(); + return 0; +} From 1c4bcea38b10bb7299ce1065f7b6d666cf870fc9 Mon Sep 17 00:00:00 2001 From: RIHAN MAHAMADASIF BAGWAN Date: Thu, 1 Jan 2026 21:00:27 +0530 Subject: [PATCH 05/34] Update Student Management System.cpp --- my_practice/Student Management System.cpp | 30 +---------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/my_practice/Student Management System.cpp b/my_practice/Student Management System.cpp index c49bf2f..8d1c8b6 100644 --- a/my_practice/Student Management System.cpp +++ b/my_practice/Student Management System.cpp @@ -1,29 +1 @@ -// Student Management System (C++) -// Compile: g++ main.cpp -o main -// Run: ./main - -#include -#include -#include - -using namespace std; - -class Student { - string name; - int rollNo; -public: - Student(string n, int r) : name(n), rollNo(r) {} - void display() { - cout << "Name: " << name << " | Roll: " << rollNo << endl; - } -}; - -int main() { - vector db; - db.push_back(Student("Alex", 101)); - db.push_back(Student("Sam", 102)); - - cout << "--- Student Database ---" << endl; - for(auto &s : db) s.display(); - return 0; -} + From f417f40ecdbfccf5a4c9d3e160687eec848b7c15 Mon Sep 17 00:00:00 2001 From: RIHAN MAHAMADASIF BAGWAN Date: Fri, 2 Jan 2026 17:40:18 +0530 Subject: [PATCH 06/34] Add multiple variable declarations with types from code with harry course i got knowledge and hand on code data types in python --- my_practice/datatypes.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 my_practice/datatypes.py diff --git a/my_practice/datatypes.py b/my_practice/datatypes.py new file mode 100644 index 0000000..b6abe6a --- /dev/null +++ b/my_practice/datatypes.py @@ -0,0 +1,9 @@ +a = 1 # a is an integer + +b = 5.22 # b is a floating point number + +c = "Harry" # c is a string + +d = False # d is a boolean variable + +e = None # e is a none type variable From db061aac3ae273dc1cb6ff8f4559902c95cfa2b5 Mon Sep 17 00:00:00 2001 From: RIHAN MAHAMADASIF BAGWAN Date: Fri, 2 Jan 2026 17:59:49 +0530 Subject: [PATCH 07/34] Import pyjokes and print a random joke Fix variable name from 'joke' to 'jokes' for correct output. --- my_practice/pyjokes.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 my_practice/pyjokes.py diff --git a/my_practice/pyjokes.py b/my_practice/pyjokes.py new file mode 100644 index 0000000..898c87f --- /dev/null +++ b/my_practice/pyjokes.py @@ -0,0 +1,7 @@ +import pyjokes + +# print("printing jokes") + +# this prints a random jokes +joke=pyjokes.getjokes() +print(jokes) From 6c0ba7b3c97c3404165b621bd1e145e9b0343772 Mon Sep 17 00:00:00 2001 From: RIHAN MAHAMADASIF BAGWAN Date: Fri, 2 Jan 2026 18:05:23 +0530 Subject: [PATCH 08/34] Add script to list directory contents using os module --- access content direct through os module.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 access content direct through os module.py diff --git a/access content direct through os module.py b/access content direct through os module.py new file mode 100644 index 0000000..7b62529 --- /dev/null +++ b/access content direct through os module.py @@ -0,0 +1,9 @@ +import os + +#select the directory whose content you wnat to list +directory_path = '/' + +#use the os module to list the directory content +contents = os.listdir(directory_path) +#print the contents of the directory +print(contents) From 08b4cd08a356a61e17454c18085bb68d92108cc3 Mon Sep 17 00:00:00 2001 From: RIHAN MAHAMADASIF BAGWAN Date: Fri, 2 Jan 2026 18:10:22 +0530 Subject: [PATCH 09/34] Add script to list directory contents This script lists the contents of a specified directory using the os module. --- FileExplorer.Py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 FileExplorer.Py diff --git a/FileExplorer.Py b/FileExplorer.Py new file mode 100644 index 0000000..c144d4b --- /dev/null +++ b/FileExplorer.Py @@ -0,0 +1,19 @@ +import os # 📦 Import the built-in 'os' module to interact with the operating system + +# 📂 Select the directory whose contents you want to list +directory_path = '/' +# '/' means the root directory (top-most folder of the file system) +# On Windows, this may raise an error. Example alternative: 'C:\\' or '.' (current folder) + +# 🧠 Use the os module to list the directory contents +contents = os.listdir(directory_path) +# os.listdir(): +# - Reads all files and folders inside the given directory +# - Returns the result as a Python list of strings +# - Each string is a file or folder name +# - It does NOT give file sizes or details, only names + +# 🖨️ Print the contents of the directory +print(contents) +# print(): +# - Displays the list of files and folders on the screen From 3cd01c68377d42c4fdb3505a366d50c8d4acb077 Mon Sep 17 00:00:00 2001 From: RIHAN MAHAMADASIF BAGWAN Date: Sat, 3 Jan 2026 20:15:39 +0530 Subject: [PATCH 10/34] Delete Chapter 1 - PS directory --- Chapter 1 - PS/Problem1.py | 24 ------------------------ Chapter 1 - PS/Problem2.py | 1 - Chapter 1 - PS/Problem3.py | 4 ---- Chapter 1 - PS/Problem4.py | 10 ---------- 4 files changed, 39 deletions(-) delete mode 100644 Chapter 1 - PS/Problem1.py delete mode 100644 Chapter 1 - PS/Problem2.py delete mode 100644 Chapter 1 - PS/Problem3.py delete mode 100644 Chapter 1 - PS/Problem4.py diff --git a/Chapter 1 - PS/Problem1.py b/Chapter 1 - PS/Problem1.py deleted file mode 100644 index 992e0a7..0000000 --- a/Chapter 1 - PS/Problem1.py +++ /dev/null @@ -1,24 +0,0 @@ -print(''' Twinkle, twinkle, little star, -How I wonder what you are! -Up above the world so high, -Like a diamond in the sky. - -When the blazing sun is gone, -When he nothing shines upon, -Then you show your little light, -Twinkle, twinkle, all the night. - -Then the trav'ller in the dark, -Thanks you for your tiny spark, -He could not see which way to go, -If you did not twinkle so. - -In the dark blue sky you keep, -And often thro' my curtains peep, -For you never shut your eye, -Till the sun is in the sky. - -'Tis your bright and tiny spark, -Lights the trav'ller in the dark: -Tho' I know not what you are, -Twinkle, twinkle, little star.''') \ No newline at end of file diff --git a/Chapter 1 - PS/Problem2.py b/Chapter 1 - PS/Problem2.py deleted file mode 100644 index a3e6d65..0000000 --- a/Chapter 1 - PS/Problem2.py +++ /dev/null @@ -1 +0,0 @@ -# Done using REPL \ No newline at end of file diff --git a/Chapter 1 - PS/Problem3.py b/Chapter 1 - PS/Problem3.py deleted file mode 100644 index 5a7823a..0000000 --- a/Chapter 1 - PS/Problem3.py +++ /dev/null @@ -1,4 +0,0 @@ -import pyttsx3 -engine = pyttsx3.init() -engine.say("Hey I am good") -engine.runAndWait() \ No newline at end of file diff --git a/Chapter 1 - PS/Problem4.py b/Chapter 1 - PS/Problem4.py deleted file mode 100644 index a0a3457..0000000 --- a/Chapter 1 - PS/Problem4.py +++ /dev/null @@ -1,10 +0,0 @@ -import os - -# Select the directory whose content you want to list -directory_path = '/' - -# Use the os module to list the directory content -contents = os.listdir(directory_path) - -# Print the contents of the directory -print(contents) From 69a531840405e19f03bd493f04d04b9fa84a1294 Mon Sep 17 00:00:00 2001 From: RIHAN MAHAMADASIF BAGWAN Date: Sat, 3 Jan 2026 20:16:44 +0530 Subject: [PATCH 11/34] Add BMI calculation script --- calcualte_bmi.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 calcualte_bmi.py diff --git a/calcualte_bmi.py b/calcualte_bmi.py new file mode 100644 index 0000000..ee4cc0c --- /dev/null +++ b/calcualte_bmi.py @@ -0,0 +1,9 @@ +# BMI 🏋️‍♀️ +# Codédex + +weight = 92.3 +height = 1.86 + +bmi = weight / (height**2) + +print(bmi) From 6611f3ac3083046ba19aed4ab54e483c920ba96b Mon Sep 17 00:00:00 2001 From: RIHAN MAHAMADASIF BAGWAN Date: Sat, 3 Jan 2026 20:23:02 +0530 Subject: [PATCH 12/34] Add Pythagorean theorem calculation script --- pythagorean theorem.py | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 pythagorean theorem.py diff --git a/pythagorean theorem.py b/pythagorean theorem.py new file mode 100644 index 0000000..6205949 --- /dev/null +++ b/pythagorean theorem.py @@ -0,0 +1,4 @@ +a=int(input("enter a:")) +b=int(input("enter b:")) +c=(a**2 + b**2)**0.5 +print(c) From 55ef2c94f7ce85d83f09dc0c4dcc4494466461c6 Mon Sep 17 00:00:00 2001 From: RIHAN MAHAMADASIF BAGWAN Date: Sat, 3 Jan 2026 20:23:26 +0530 Subject: [PATCH 13/34] Update calcualte_bmi.py --- calcualte_bmi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/calcualte_bmi.py b/calcualte_bmi.py index ee4cc0c..84d597f 100644 --- a/calcualte_bmi.py +++ b/calcualte_bmi.py @@ -1,5 +1,5 @@ # BMI 🏋️‍♀️ -# Codédex + weight = 92.3 height = 1.86 From 5bfdd0567e35ab74179f290a6acb13a4adf7e249 Mon Sep 17 00:00:00 2001 From: RIHAN MAHAMADASIF BAGWAN Date: Thu, 8 Jan 2026 21:20:34 +0530 Subject: [PATCH 14/34] Create remainder.py --- remainder.py | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 remainder.py diff --git a/remainder.py b/remainder.py new file mode 100644 index 0000000..ac85fa7 --- /dev/null +++ b/remainder.py @@ -0,0 +1,3 @@ +a=43 +b=34 +print("Remainder when a is divided by b", a % b) From 88b38b46b75404d82f3da83f996462719e5183b0 Mon Sep 17 00:00:00 2001 From: RIHAN MAHAMADASIF BAGWAN Date: Thu, 8 Jan 2026 21:21:44 +0530 Subject: [PATCH 15/34] Create typecast.py --- typecast.py | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 typecast.py diff --git a/typecast.py b/typecast.py new file mode 100644 index 0000000..d0e5fab --- /dev/null +++ b/typecast.py @@ -0,0 +1,2 @@ +a=input("enter value of a;") +print(type(a)) From 33a32bfe71b86f44acbb7b51873260a61a0a6623 Mon Sep 17 00:00:00 2001 From: RIHAN MAHAMADASIF BAGWAN Date: Fri, 9 Jan 2026 15:04:24 +0530 Subject: [PATCH 16/34] Create tabspaceandneline.py --- tabspaceandneline.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 tabspaceandneline.py diff --git a/tabspaceandneline.py b/tabspaceandneline.py new file mode 100644 index 0000000..75d791d --- /dev/null +++ b/tabspaceandneline.py @@ -0,0 +1 @@ +letters= dear sir, \n\tHello, nice to meet you. My work was evaluated through my GitHub profile during an off-campus review.\n Thanks! From 190ef23b2c4945a6cfd5f28d37bef76aca7d1385 Mon Sep 17 00:00:00 2001 From: RIHAN MAHAMADASIF BAGWAN Date: Fri, 9 Jan 2026 15:05:00 +0530 Subject: [PATCH 17/34] Update tabspaceandneline.py --- tabspaceandneline.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tabspaceandneline.py b/tabspaceandneline.py index 75d791d..d43d0f8 100644 --- a/tabspaceandneline.py +++ b/tabspaceandneline.py @@ -1 +1,2 @@ letters= dear sir, \n\tHello, nice to meet you. My work was evaluated through my GitHub profile during an off-campus review.\n Thanks! +print(letters) From 64f97d14365120b3530bc80b0c2662c3c8245ac9 Mon Sep 17 00:00:00 2001 From: RIHAN MAHAMADASIF BAGWAN Date: Sat, 10 Jan 2026 22:14:01 +0530 Subject: [PATCH 18/34] Create rules for variable.py --- Chapter 2/rules for variable.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Chapter 2/rules for variable.py diff --git a/Chapter 2/rules for variable.py b/Chapter 2/rules for variable.py new file mode 100644 index 0000000..be112fb --- /dev/null +++ b/Chapter 2/rules for variable.py @@ -0,0 +1,12 @@ +a = 23 + +aaa = 435 + +Rihan = 34 + +sameer = 45 + +_samerr = 34 + +# @sameer = 56 # Invalid due to @ symbol +# s@meer # Invalid due to @ symbol From 0c28b19cbc4ed1cfc89a31e1e855d135565f8bcb Mon Sep 17 00:00:00 2001 From: RIHAN MAHAMADASIF BAGWAN Date: Sat, 10 Jan 2026 22:15:19 +0530 Subject: [PATCH 19/34] Create operators.py --- operators.py | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 operators.py diff --git a/operators.py b/operators.py new file mode 100644 index 0000000..a9d4776 --- /dev/null +++ b/operators.py @@ -0,0 +1,38 @@ +# Arithmetic Operators +a = 7 +b = 4 +c = a + b +print(c) + +# Assignment Operators +a = 4-2 # Assign 4-2 in a +print(a) +b = 6 +# b += 3 # Increment the value of b by 3 and then assign it to b +b -= 3 # Decrement the value of b by 3 and then assign it to b +print(b) + +# Comparison Operators + +d = 5==5 + +print(d) + + +# Logical Operators + +e = True or False + +# Truth table of 'or' +print("True or False is ", True or False) +print("True or True is ", True or True) +print("False or True is ", False or True) +print("False or False is ", False or False) + +# Truth table of 'and' +print("True and False is ", True and False) +print("True and True is ", True and True) +print("False and True is ", False and True) +print("False and False is ", False and False) + +print(not(True)) From 4c604bd3548231731ea57121c7e3d1aaa36748af Mon Sep 17 00:00:00 2001 From: RIHAN MAHAMADASIF BAGWAN Date: Mon, 12 Jan 2026 15:32:18 +0530 Subject: [PATCH 20/34] Create negatiev slicing.py --- negatiev slicing.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 negatiev slicing.py diff --git a/negatiev slicing.py b/negatiev slicing.py new file mode 100644 index 0000000..c493764 --- /dev/null +++ b/negatiev slicing.py @@ -0,0 +1,7 @@ +name="Rihan" +print(name[0:3] +print(name[-4:1]) +print(name[1:4]) + +print(name[:4]) + From e5c9f7117a9a0be73245c78690f5c6dd26940911 Mon Sep 17 00:00:00 2001 From: RIHAN MAHAMADASIF BAGWAN Date: Mon, 12 Jan 2026 15:32:50 +0530 Subject: [PATCH 21/34] Rename negatiev slicing.py to negative_slicing.py --- negatiev slicing.py => negative_slicing.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename negatiev slicing.py => negative_slicing.py (100%) diff --git a/negatiev slicing.py b/negative_slicing.py similarity index 100% rename from negatiev slicing.py rename to negative_slicing.py From c9f7dba75d52d0b4cbf00e028d5298679392375d Mon Sep 17 00:00:00 2001 From: RIHAN MAHAMADASIF BAGWAN Date: Mon, 12 Jan 2026 15:33:21 +0530 Subject: [PATCH 22/34] Update negative_slicing.py --- negative_slicing.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/negative_slicing.py b/negative_slicing.py index c493764..3cf0307 100644 --- a/negative_slicing.py +++ b/negative_slicing.py @@ -1,5 +1,6 @@ name="Rihan" -print(name[0:3] +print(name[0:3]) + print(name[-4:1]) print(name[1:4]) From 5ca341496a9e839ff98d42ef43c1de97d3dd71ef Mon Sep 17 00:00:00 2001 From: RIHAN MAHAMADASIF BAGWAN Date: Wed, 14 Jan 2026 15:25:15 +0530 Subject: [PATCH 23/34] i learn from this how to call inputed variable in string using f() feature --- fvarible{},py | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 fvarible{},py diff --git a/fvarible{},py b/fvarible{},py new file mode 100644 index 0000000..475792d --- /dev/null +++ b/fvarible{},py @@ -0,0 +1,2 @@ +name = input("enter your name") +print(f"Good morning,{name}") From 38db8fda7b4f24a6bf6a1e1704100475c1087488 Mon Sep 17 00:00:00 2001 From: RIHAN MAHAMADASIF BAGWAN Date: Wed, 14 Jan 2026 15:33:31 +0530 Subject: [PATCH 24/34] Create list.py --- list.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 list.py diff --git a/list.py b/list.py new file mode 100644 index 0000000..2f705aa --- /dev/null +++ b/list.py @@ -0,0 +1,6 @@ +purchase list = ["Apples","Orange",5,43.5,False,"Aakash","ROhan"] + +prints(friends[0]) +friends[0]="Grapes" #unlike list strings are mutable +print(friends[0]) +print(friends[1:4]) From 9e8525534abca3c36ffa6442af5449acada4a856 Mon Sep 17 00:00:00 2001 From: RIHAN MAHAMADASIF BAGWAN Date: Wed, 14 Jan 2026 15:54:18 +0530 Subject: [PATCH 25/34] i understand what i can do with list methods --- list_methodft.wwe.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 list_methodft.wwe.py diff --git a/list_methodft.wwe.py b/list_methodft.wwe.py new file mode 100644 index 0000000..790723c --- /dev/null +++ b/list_methodft.wwe.py @@ -0,0 +1,11 @@ +candidates = ["John cena","undertaker","Roman Reings",5,4.45,True] +prints(candidates) +candidates.append("The Rock") +l1=[1,23,54,67,32,12] +Ranks=[1,23,54,67,32,12] +#l1.sort() +#l1.reverse() +#l1.insert(2,22222) +disqualified= Ranks.pop(3) +print(disqualified) +print(Ranks) From df9b7efc369f60b86ddffbae3aa9c8e4add09d52 Mon Sep 17 00:00:00 2001 From: RIHAN MAHAMADASIF BAGWAN Date: Thu, 15 Jan 2026 18:51:22 +0530 Subject: [PATCH 26/34] Create 03_tuple.py --- 03_tuple.py | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 03_tuple.py diff --git a/03_tuple.py b/03_tuple.py new file mode 100644 index 0000000..cc8859d --- /dev/null +++ b/03_tuple.py @@ -0,0 +1,3 @@ +a = (1,45,342,3424,False, "Rihan", "Nihal") +print(a) +print(type(a)) From 27bfb7164ca5de3691f138268213c28d277f72c4 Mon Sep 17 00:00:00 2001 From: RIHAN MAHAMADASIF BAGWAN Date: Thu, 15 Jan 2026 19:11:45 +0530 Subject: [PATCH 27/34] i leaned about tuple methods how i can access and knows about them --- 4tuple_methods.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 4tuple_methods.py diff --git a/4tuple_methods.py b/4tuple_methods.py new file mode 100644 index 0000000..5930e6e --- /dev/null +++ b/4tuple_methods.py @@ -0,0 +1,7 @@ +a-(1,22,3,45,False,"RIhan") +print(a) +no = a.count(45) +print(no) +i=a.index(3424) +print(i) +print(len(a)) From f775276b675ab33abf60727bcc68a99b34312b5a Mon Sep 17 00:00:00 2001 From: RIHAN MAHAMADASIF BAGWAN Date: Thu, 15 Jan 2026 19:16:58 +0530 Subject: [PATCH 28/34] dictonary learned i learned in dictonary how i can use in daily life eg. marks gain via python programming dictonary --- diconary.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 diconary.py diff --git a/diconary.py b/diconary.py new file mode 100644 index 0000000..a8ef581 --- /dev/null +++ b/diconary.py @@ -0,0 +1,6 @@ +d={} #empty dictonary +marks= { + "Rihan":100, + "Nihal":99, +} +print(marks["Rihan:"]) From 306026c2cb2a12de60732d531baa639778bdbc5a Mon Sep 17 00:00:00 2001 From: RIHAN MAHAMADASIF BAGWAN Date: Sun, 18 Jan 2026 16:47:17 +0530 Subject: [PATCH 29/34] i learn this program how set modify and types --- set_methods and operations.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 set_methods and operations.py diff --git a/set_methods and operations.py b/set_methods and operations.py new file mode 100644 index 0000000..fe481bb --- /dev/null +++ b/set_methods and operations.py @@ -0,0 +1,25 @@ +# Corrected and commented set examples + +# Create a set. Sets are unordered collections of unique items. +s = {1, 2, 3, 4, 5, 68, 42, "harry"} # mixing ints and strings is allowed but uncommon +print("Initial set:", s, "Type:", type(s)) + +# Add an element to the set +s.add(566) +print("After add(566):", s) + +# Remove an element safely +# .remove(x) raises KeyError if x not present. .discard(x) does not raise. +s.discard(1) +print("After discard(1):", s) + +# ---------------------------------------------------------------- # +# SET OPERATIONS: UNION and INTERSECTION +s1 = {1, 45, 6, 78} +s2 = {7, 8, 1, 78} + +# union: all unique elements from both sets +print("s1 union s2:", s1.union(s2)) + +# intersection: elements common to both sets +print("s1 intersection s2:", s1.intersection(s2)) From a750d28cbd7a71e4746dd69674e7e6837a788ed7 Mon Sep 17 00:00:00 2001 From: RIHAN MAHAMADASIF BAGWAN Date: Wed, 21 Jan 2026 18:07:43 +0530 Subject: [PATCH 30/34] Correct input and loop syntax in table.py Fix syntax errors in multiplication table generation. --- table.py | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 table.py diff --git a/table.py b/table.py new file mode 100644 index 0000000..4fccfe6 --- /dev/null +++ b/table.py @@ -0,0 +1,3 @@ +print=int(input("enter number") +for i in range(1,11): # common mistake use always synatx in loops +print(f"{i} * {n} = { n * i) ")#f string via we can call values for inputed value From b3194bcfbce4e427355055fb72d526bf3fec98b0 Mon Sep 17 00:00:00 2001 From: RIHAN MAHAMADASIF BAGWAN Date: Fri, 23 Jan 2026 12:16:59 +0530 Subject: [PATCH 31/34] Add multiplication table for user input number --- usertypetable.py | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 usertypetable.py diff --git a/usertypetable.py b/usertypetable.py new file mode 100644 index 0000000..d9bfd2a --- /dev/null +++ b/usertypetable.py @@ -0,0 +1,3 @@ +n= int(input "enter the number ;")) +for i in range (1,11): + print(f"{n}*{11} = {n*(11)}") From c936457655809406b787210f7d25bb20cccfd9ab Mon Sep 17 00:00:00 2001 From: RIHAN MAHAMADASIF BAGWAN Date: Fri, 23 Jan 2026 12:19:22 +0530 Subject: [PATCH 32/34] Add average calculation function --- avgfunction.pty | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 avgfunction.pty diff --git a/avgfunction.pty b/avgfunction.pty new file mode 100644 index 0000000..080d77c --- /dev/null +++ b/avgfunction.pty @@ -0,0 +1,5 @@ +a = 12 +b = 34 +c = 56 +average =(a + b + c)/3 +print(average) From 902a6c1ed23d1da33d39d66cbdac5026a390675e Mon Sep 17 00:00:00 2001 From: RIHAN MAHAMADASIF BAGWAN Date: Sat, 24 Jan 2026 11:10:52 +0530 Subject: [PATCH 33/34] Correct inch_to_cm function and print statement Fix function name and syntax errors in inches_to_cm.py --- inches_to_cm.py | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 inches_to_cm.py diff --git a/inches_to_cm.py b/inches_to_cm.py new file mode 100644 index 0000000..83e745a --- /dev/null +++ b/inches_to_cm.py @@ -0,0 +1,4 @@ +def inch_to_cm(inch) + return inch * 2.54 +n = int(input('enter value in inches: ")) +print(f"the corresponding vlaue in cms is (inches_to_cms(n)}") From aa50bdfdf87f61d87b76eb1f667d639f41a60912 Mon Sep 17 00:00:00 2001 From: RIHAN MAHAMADASIF BAGWAN Date: Sun, 25 Jan 2026 15:31:02 +0530 Subject: [PATCH 34/34] Add age eligibility check program --- age_eligibility.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 age_eligibility.py diff --git a/age_eligibility.py b/age_eligibility.py new file mode 100644 index 0000000..fd5388d --- /dev/null +++ b/age_eligibility.py @@ -0,0 +1,12 @@ +a = int(input("Enter your age: ")) + +# If else statement +if(a>=18): + print("You are above the age of consent") + print("Good for you") + +else: + print("You are below the age of consent") + + +print("End of Program")