Skip to content

Latest commit

 

History

History
97 lines (80 loc) · 1.77 KB

File metadata and controls

97 lines (80 loc) · 1.77 KB

🐍 Python Practice

Welcome to my Python Practice repository! 🐍

This repository contains my journey of learning Python programming. Here I practice Python fundamentals, write small programs, and build simple projects to improve my programming logic and problem-solving skills.

The goal of this repository is to learn Python step by step and build a strong foundation.


📚 What this repo includes

Variables

name = "Nika"
age = 19
price = 19.99
is_student = True
Data Types
Stringstext
Integerswhole numbers
Floatsdecimal numbers
BooleansTrue / False
User Input
name = input("What is your name? ")
print(f"Hello {name}")
Type Casting
int()
float()
str()

Example:

age = int(input("Age: "))
Conditions
is_student = True

if is_student:
    print("You are a student")
else:
    print("You are not a student")
Operators
+  -  *  /  **  %
+= -= *= /=

Example:

friends = 10
friends += 1
Math Module
import math

Examples:

math.pi
math.sqrt(25)
math.pow(2, 3)
math.ceil(4.2)
math.floor(4.9)
🚀 Mini Projects
Rectangle Area Calculator
length = float(input("Length: "))
width = float(input("Width: "))
area = length * width
print(area)
Shopping Cart
item = input("Item: ")
price = float(input("Price: "))
qty = int(input("Quantity: "))
total = price * qty
print(total)
Madlibs Game
adj = input("Adjective: ")
noun = input("Noun: ")
verb = input("Verb ending in -ing: ")

print(f"I saw a {noun} that was {adj} and {verb}")
Circle Calculator
import math

radius = float(input("Radius: "))
area = math.pi * radius ** 2
print(area)
📂 Project Structure
Python-Practice/
├── main.py
└── README.md
🎯 Goals
Learn Python basics
Improve logic
Build small projects
Practice daily coding
👨‍💻 Author

Nikushhaa
GitHub: https://github.com/Nikushhaa