Core Python Programming Repository
📚 Overview
Welcome to the Core Python Programming Repository! This repository contains a comprehensive collection of Python programs covering fundamental programming concepts, operators, data types, and basic algorithms. It's designed as a learning resource for beginners to master core Python programming concepts through practical examples.
🎯 Purpose
This repository serves as:
- A learning resource for Python beginners
- A collection of solved programming exercises
- A reference guide for basic Python operations and algorithms
- Practice material for understanding Python fundamentals
📂 Repository Structure
Core-Python/
├── README.md # Main documentation (this file)
├── Operators/ # Programs demonstrating operators and basic concepts
│ ├── README.md # Detailed problem statements
│ └── *.py # Python solution files
└── DecisionMaking/ # Programs demonstrating decision-making concepts
├── README.md # Detailed problem statements
└── *.py # Python solution files
🗂️ Programs Included
Basic Operations & Data Types
| # |
Program Name |
File |
Description |
| 1 |
First Python Program |
FirstPython.py |
Display a simple message |
| 2 |
Data Types |
Operator.py, dataType.py |
Input and display all basic data types |
Arithmetic Operations
| # |
Program Name |
File |
Description |
| 3 |
Arithmetic Operations |
ArithmeticOperation.py |
Perform all arithmetic operations on two numbers |
| 4 |
Rectangle Area |
RectangleArea.py |
Calculate area of a rectangle |
| 5 |
Circle Properties |
CircleOp.py |
Calculate diameter, area, and circumference of a circle |
Unit Conversions
| # |
Program Name |
File |
Description |
| 6 |
Length Conversion |
Convertion.py |
Convert centimeters to meters and kilometers |
| 7 |
Temperature Conversion (F to C) |
TemperatureConvertion.py |
Convert Fahrenheit to Celsius |
| 8 |
Temperature Conversion (C to F) |
TemperatureConvertion.py |
Convert Celsius to Fahrenheit |
| 17 |
Time Conversion |
TimeConvert.py |
Convert seconds to hours, minutes, and seconds |
| 18 |
Day Conversion |
ConvertDaytoMonthWeek.py |
Convert days to years, months, and weeks |
Geometry & Mathematics
| # |
Program Name |
File |
Description |
| 9 |
Triangle Angle |
FindThirdAngle.py |
Find the third angle of a triangle |
| 10 |
Equilateral Triangle |
EquilateralTriangle.py |
Calculate area of an equilateral triangle |
| 11 |
Marks Calculator |
TotalMarksPerc.py |
Calculate total marks and percentage |
| 12 |
Simple Interest |
SimpleIntrest.py |
Calculate simple interest |
| 13 |
Compound Interest |
CompoundIntrest.py |
Calculate compound interest |
Number Operations
| # |
Program Name |
File |
Description |
| 14 |
Swap with Variable |
SwappingNumberVar.py |
Swap two numbers using a third variable |
| 15 |
Swap without Variable |
SwappingWithoutVar.py |
Swap two numbers without using a third variable |
| 16 |
ASCII Value |
AsciiValue.py |
Print ASCII value of a character |
| 19 |
Cube Calculator |
DigitCount.py |
Read a number and display its cube |
| 20 |
Sum of Digits |
DigitCount.py |
Compute the sum of an integer's digits |
| 21 |
Reverse Number |
ReverseNumber.py |
Reverse a number without using a loop |
| 22 |
First & Last Digit |
FirstAndLastDigit.py |
Find first and last digit of a number |
| 23 |
Sum of First & Last |
FirstAndLastDigitSum.py |
Calculate sum of first and last digit |
Special Number Checks
| # |
Program Name |
File |
Description |
| 24 |
Neon Number |
NeonNumber.py |
Check if a number is a Neon number |
| 25 |
Palindrome |
Palindrome.py |
Check if a number is a palindrome |
| 26 |
Spy Number |
SpyNumber.py |
Check if a number is a Spy number |
Advanced Operations
| # |
Program Name |
File |
Description |
| 27 |
Toggle Case |
ToggleInput.py |
Toggle case of alphabet using ASCII values |
| 28 |
Net Salary |
NetSalaryEmployee.py |
Calculate net salary of an employee |
| 29 |
Quotient & Remainder |
FindQAndR.py |
Find quotient and remainder using arithmetic operators |
| 30 |
Multiple Check |
MultipleOrNot.py |
Check if number is multiple of both 3 and 5 |
Decision Making
| # |
Program Name |
File |
Description |
| 31 |
Even or Odd |
EvenOdd.py |
Check if a number is even or odd |
| 32 |
Leap Year |
LeapYear.py |
Check if a year is a leap year |
| 33 |
Positive or Negative |
PosNeg.py |
Determine if a number is positive, negative, or zero |
| 34 |
Largest of Three |
LargestOfThree.py |
Find the largest of three numbers |
| 35 |
Grade Calculator |
GradeCalculator.py |
Calculate grade based on marks |
| 36 |
Valid Triangle |
ValidTriangle.py |
Check whether a triangle is valid or not |
| 37 |
Triangle Type |
TriangleType.py |
Check if a triangle is equilateral, isosceles, or scalene |
| 38 |
Divisibility Check |
DivisibilityCheck.py |
Check if a number is divisible by 5 and 11 |
| 39 |
Alphabet Check |
AlphabetCheck.py |
Check whether a character is alphabetic or not |
| 40 |
Profit or Loss |
ProfitOrLoss.py |
Check profit or loss based on cost price and selling price |
| 41 |
Vowel or Consonant |
VowelOrConsonant.py |
Check if an alphabet is a vowel or consonant |
| 42 |
Character Type |
CharacterType.py |
Check if a character is an alphabet, digit, or special character |
| 43 |
Voting Eligibility |
VotingEligibility.py |
Determine if a candidate is eligible to vote |
| 44 |
Equality Check |
EqualityCheck.py |
Check if two integers are equal |
| 45 |
Gross Salary |
GrossSalary.py |
Calculate gross salary based on basic salary |
🚀 Getting Started
Prerequisites
- Python 3.x installed on your system
- A text editor or IDE (VS Code, PyCharm, Sublime Text, etc.)
- Basic understanding of programming concepts
Installation
-
Clone the repository:
git clone https://github.com/kulkarnishub377/Core-Python.git
cd Core-Python
-
Verify Python installation:
python --version
# or
python3 --version
Running Programs
Navigate to the Operators directory and run any Python file:
cd Operators
python FirstPython.py
Or use Python 3 explicitly:
Example Usage
Example 1: Running the Circle Properties Program
Enter the radius of circle: 5
The Diameter of circle is: 10.0
Circumference of circle is: 31.400000000000002
Area of circle is: 78.5
Example 2: Running the Spy Number Checker
Enter the 4 digit number: 1412
The number is Spy
📖 Learning Path
For beginners, we recommend following this learning path:
-
Start with Basics (Programs 1-3)
- First Python Program
- Data Types
- Arithmetic Operations
-
Move to Calculations (Programs 4-13)
- Geometric calculations
- Unit conversions
- Interest calculations
-
Number Manipulation (Programs 14-23)
- Swapping techniques
- Digit operations
- Number reversals
-
Advanced Concepts (Programs 24-30)
- Special number properties
- ASCII operations
- Complex calculations
-
Decision Making (Programs 31-35)
- Even or Odd determination
- Leap year calculation
- Positive/Negative number identification
- Largest of three numbers
- Grade calculation based on marks
🔍 Key Concepts Covered
- Data Types: int, float, bool, str, chr
- Operators: Arithmetic (+, -, *, /, //, %), Comparison, Logical
- Input/Output: input(), print()
- Type Conversion: int(), float(), str()
- Mathematical Operations: pow(), basic formulas
- Number Manipulation: Extracting digits, reversing numbers
- ASCII Operations: Character manipulation using ASCII values
- Algorithm Basics: Swap techniques, digit operations
- Decision Making: if-else conditions, logical reasoning
📝 Program Descriptions
Special Number Concepts
Neon Number: A number whose sum of digits of its square equals the number itself.
- Example: 9 → 9² = 81 → 8 + 1 = 9 ✓
Spy Number: A number where the sum of all digits equals the product of all digits.
- Example: 1412 → Sum(1+4+1+2) = 8, Product(1×4×1×2) = 8 ✓
Palindrome Number: A number that reads the same forwards and backwards.
- Example: 121, 1331, 12321
Decision Making Concepts
Even or Odd: Determines if a number is even (divisible by 2) or odd.
- Example: 4 is even, 7 is odd
Leap Year: A year is a leap year if divisible by 4, but not every year divisible by 100, except if also divisible by 400.
- Example: 2000 and 2020 are leap years, 1900 is not
Positive, Negative, or Zero: Classifies a number as positive (>0), negative (<0), or zero (=0).
- Example: -5 is negative, 3 is positive, 0 is neither
Largest of Three: Finds the largest number among three given numbers.
- Example: Among 3, 7, and 5, the largest is 7
Grade Calculation: Assigns a grade based on marks using if-elif-else conditions.
- Example: 85 marks → Grade A, 70 marks → Grade B
🤝 Contributing
Contributions are welcome! If you'd like to contribute:
- Fork the repository
- Create a new branch (
git checkout -b feature/new-program)
- Add your program with proper documentation
- Commit your changes (
git commit -m 'Add new program')
- Push to the branch (
git push origin feature/new-program)
- Open a Pull Request
Contribution Guidelines
- Follow Python naming conventions (PEP 8)
- Add comments explaining the logic
- Include example input/output in comments
- Test your code before submitting
- Update the README if adding new programs
📋 Code Style
All programs in this repository follow these conventions:
- Naming: Descriptive variable names (camelCase or snake_case)
- Comments: Triple-quoted docstrings for problem statements
- Input: Clear prompts for user input
- Output: Descriptive output messages
- Structure: Simple, readable code suitable for beginners
🐛 Known Issues
- Some programs reference "Java" in comments but are Python implementations
- The
Operators/README.md file also references Java instead of Python
🔮 Future Enhancements
- Add more advanced programs (loops, functions, classes)
- Include unit tests for each program
- Add error handling and input validation
- Create separate directories for different topics
- Add more complex algorithms and data structures
📚 Additional Resources
Learning Python
Practice Platforms
📄 License
This project is available for educational purposes. Feel free to use these programs for learning and teaching Python programming.
👨💻 Author
Kulkarni Shubham
📞 Contact & Support
If you have questions, suggestions, or found a bug:
- Open an issue on GitHub
- Submit a pull request with improvements
- Star ⭐ this repository if you find it helpful!
🙏 Acknowledgments
- Thanks to all contributors who help improve this repository
- Inspired by common programming practice problems
- Created as a learning resource for the Python community
Happy Coding! 🐍
Last Updated: October 2026