DAY 53 — 60 DAY PYTHON CHALLENGE
Name Generator
Python mein Name Generator banao — Hindi mein step by step
Advertisement
Project kya hai?
Day 53 ka project hai Name Generator!
Yeh project banane se aap Python ke important concepts
practice kar payenge. Neeche complete code hai — copy karo aur chalao!
Complete Python Code
python — namegen.py
import random
prefixes = ["Arya","Dev","Vik","Kri","Adit","Neh","Raj","Sam","Pra","Ish","Van","Sur"]
boy_suf = ["an","esh","aj","ant","it","dev","ik","al"]
girl_suf = ["ya","ika","ita","ati","ini","ayi","na","ni"]
meanings = ["Shaktishali","Buddhiman","Sahasi","Dayalu","Chatur","Sundar","Tej","Gyani"]
print("=== Name Generator ===")
print("\n1. Random names")
print("2. Baby boy names")
print("3. Baby girl names")
print("4. Username banao")
print("5. Business name")
ch = input("\nChoice: ")
if ch == "1":
print("\n5 Generated Names:")
for _ in range(5):
suf = random.choice(boy_suf + girl_suf)
name = random.choice(prefixes) + suf
meaning = random.choice(meanings)
print(f" {name:12} - {meaning}")
elif ch == "2":
print("\nBaby Boy Names:")
for _ in range(7):
name = random.choice(prefixes) + random.choice(boy_suf)
print(f" {name}")
elif ch == "3":
print("\nBaby Girl Names:")
for _ in range(7):
name = random.choice(prefixes) + random.choice(girl_suf)
print(f" {name}")
elif ch == "4":
base = input("Apna naam likho: ")
print(f"\nUsernames for '{base}':")
for _ in range(5):
print(f" @{base.lower()}{random.randint(10,999)}")
print(f" @the_{base.lower()}")
print(f" @{base.lower()}_official")
elif ch == "5":
words1 = ["Tech","Digi","Smart","Fast","Neo","Cyber","Cloud","Data"]
words2 = ["Labs","Hub","Works","Soft","Net","Solutions","Studio","Corp"]
print("\nBusiness Names:")
for _ in range(6):
print(f" {random.choice(words1)}{random.choice(words2)}")
OUTPUT
Choice: 2 Baby Boy Names: Devesh Aryan Vikant Rajit Krishdev Samaj Pradit
Code kaise kaam karta hai?
String concatenation se naye names bante hain. Gender ke hisaab se alag suffixes use hote hain. Business names mein word combination se creative names milte hain.
Advertisement
📋 Project ka Introduction
Name Generator Python ka Day 53 ka project hai. Is project mein aap Python ke important concepts practice karenge jo real-world applications mein bahut use hote hain.
Yeh project beginners ke liye design kiya gaya hai lekin kaafi concepts cover karta hai. Step by step samjho, code chalao, aur khud modify karke practice karo.
Is tarah ke projects banane se aapka Python confidence badh jaata hai aur aap asli problems solve karna seekh jaate hain. Chaliye code samjhte hain!
Yeh project beginners ke liye design kiya gaya hai lekin kaafi concepts cover karta hai. Step by step samjho, code chalao, aur khud modify karke practice karo.
Is tarah ke projects banane se aapka Python confidence badh jaata hai aur aap asli problems solve karna seekh jaate hain. Chaliye code samjhte hain!
🧠 Is Project mein kya seekhoge?
Yeh project banate waqt aap ye Python concepts use karoge:
| Concept | Kya karta hai |
|---|---|
Variables | Data store karna |
Functions | Reusable code blocks |
Loops | Repeat karna |
Conditions | Decisions lena |
Input/Output | User se interact karna |
📝 Code kaise kaam karta hai — Step by Step
Neeche code ki poori logic step-by-step samjhayi gayi hai:
- Problem samjho: Name Generator mein kya karna hai
- Required variables aur data structures decide karo
- Logic step-by-step likhó
- Code mein implement karo
- Test karo aur bugs fix karo
⚠️ Common Mistakes — Bhool mat jaana!
Beginners yeh galtiyan aksar karte hain — dhyan rakho:
- ⚠️ Indentation sahi rakho — Python mein spaces matter karti hain
- ⚠️ Variables ko use se pehle define karo
- ⚠️ Input ko int()/float() mein convert karo agar number chahiye
- ⚠️ Edge cases handle karo — kya hoga agar user galat input de?
🏋️ Practice Exercises — Aage badho!
Yeh project complete karne ke baad in exercises se practice karo:
- 💡 Name Generator mein naya feature add karo
- 💡 Code ko functions mein refactor karo
- 💡 Error handling improve karo
- 💡 File mein data save karo
❓ Aksar Pooche Jane Wale Sawal (FAQ)
Q: Name Generator project kyon banana chahiye?
A: Har project ek naya concept sikhata hai. Practice se hi Python fluent aati hai.
A: Har project ek naya concept sikhata hai. Practice se hi Python fluent aati hai.
Q: Code run nahi ho raha?
A: Indentation check karo, syntax errors dekho, variables define hain ya nahi check karo.
A: Indentation check karo, syntax errors dekho, variables define hain ya nahi check karo.
Q: Kaise improve karein?
A: Pehle basic version complete karo, phir ek ek feature add karte jao.
A: Pehle basic version complete karo, phir ek ek feature add karte jao.