Python Community
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.
Click here to claim your Sponsored Listing.