Python Community

Python Community

Share

22/03/2026

Today, let's start with the first topic in Python Programming Roadmap:

βœ… *Python Programming Basics* πŸπŸ’»

*πŸ“Œ Step 1: Install Python & VS Code*
β€’ Download Python 3.11+ from python.org
β€’ During install, check βœ… *Add Python to PATH*
β€’ Install *VS Code*
β€’ In VS Code, install the *Python* extension
To check:
Open terminal β†’ Type: `python --version`
You should see something like: `Python 3.x.x`

*πŸ“Œ Step 2: Your First Python Program*
Create a file: `hello.py`
Paste this code:
```
print("Hello, Python")
```
Run it in terminal: `python hello.py`
🧠 Python runs code top to bottom
πŸ–¨οΈ `print()` displays output on the screen

*πŸ“Œ Step 3: Variables*
Variables store values.
```
age = 25
name = "Deepak"
height = 5.11
print(age, name, height)
```
βœ”οΈ No need to declare types β€” Python figures it out
βœ”οΈ Use lowercase names with underscores

*πŸ“Œ Step 4: Data Types*
β€’ `int` β†’ Whole numbers (e.g., 10)
β€’ `float` β†’ Decimals (e.g., 3.14)
β€’ `str` β†’ Text (e.g., "hello")
β€’ `bool` β†’ True / False

To check type:
```
x = 10
print(type(x))
```

*πŸ“Œ Step 5: Input & Output*
Take input from user:
```python
name = input("Enter your name: ")
print("Hello", name)
```

Convert string input to number:
```
age = int(input("Enter age: "))
print("Next year you'll be", age + 1)
```

*πŸ“Œ Step 6: Arithmetic Operators*
```
a = 10
b = 3
print(a + b) # Add
print(a - b) # Subtract
print(a * b) # Multiply
print(a / b) # Divide
print(a // b) # Floor division
print(a % b) # Remainder
```

*πŸ“Œ Step 7: String Operations*
```
first = "Data"
second = "Analyst"
print(first + " " + second) # Concatenate
print("Hi " * 3) # Repeat
print(len(first)) # Length
```

*πŸ“Œ Step 8: Practice Programs*
1️⃣ Simple Calculator
β†’ Input 2 numbers, show sum, difference, product, division

2️⃣ Temperature Converter
β†’ Input Celsius, convert to Fahrenheit
`F = (C * 9/5) + 32`

3️⃣ Age After 5 Years
β†’ Input current age, print age after 5 years

Here is the detailed code for each project:

πŸ“Œ *Project 1. Simple Calculator*
```
num1 = float(input("Enter first number: "))
num2 = float(input("Enter second number: "))

print("Addition:", num1 + num2)
print("Subtraction:", num1 - num2)
print("Multiplication:", num1 * num2)

if num2 != 0:
print("Division:", num1 / num2)
else:
print("Division not possible")
```

πŸ“Œ *Project 2. Temperature Converter (Celsius to Fahrenheit)*
```
celsius = float(input("Enter temperature in Celsius: "))
fahrenheit = (celsius * 9 / 5) + 32
print("Temperature in Fahrenheit:", fahrenheit)
```

πŸ“Œ *Project 3. Age After 5 Years*
```
age = int(input("Enter your age: "))
future_age = age + 5
print("Your age after 5 years:", future_age)
```

🎁 *Bonus Practice – Area of a Rectangle*
```
length = float(input("Enter length: "))
width = float(input("Enter width: "))
area = length * width
print("Area of rectangle:", area)
```

πŸ’‘*Useful Tips*
β€’ Run each program
β€’ Change input values
β€’ Break it on purpose and fix it

🧠 *Daily Rule:*
β€’ Code at least 60 mins
β€’ Type every line manually
β€’ Don’t copy-paste β€” build muscle memory

Python Community

17/06/2025

Guess the Output ....
Comment your Ans .
Also Follow Python Community for more coding tips .

08/06/2025

A program to capitalize every single words in a string ,without using title() function.

Want your business to be the top-listed Media Company in Bannu Cantonment?
Click here to claim your Sponsored Listing.

Category

Website

Address

Bannu Cantonment