Перейти к содержимому

Python Basics for AI: Variables, Data Types, Strings, Lists & Input | GenAI with Python #4

IlluminatingCode

0:00 / 0:00

Python Basics for AI: Variables, Data Types, Strings, Lists & Input | GenAI with Python #4

141 просмотр · 2 нед. назад
IlluminatingCode
63 подписчика
141 просмотр · 2 нед. назад
AI coding ke liye Python ke 4 basics: variables, data types, strings aur lists, aur input/output. Pehle har concept board pe simple tarike se samjhenge, phir VS Code ke Jupyter notebook mein khud code karke dekhenge. End mein ek mini project banayenge: Prompt Builder, jo user ke input se AI prompt ready karta hai. 🐍 Yeh "Generative AI with Python: From Beginner to AI Developer" series ka Video 4 hai. 📌 Is video mein aap seekhoge: • Variable = labelled box, aur = ka matlab assign • Variable naming rules (letters, numbers, _ ; no spaces; number se start nahi) • Data types: str, int, float, bool, aur type() function • "90" + "5" = 905 kyun aata hai? Type conversion with int() • String concatenation, TypeError (str + int), aur f-strings • Prompt bhi ek string hai: f-string se dynamic prompt • .upper() aur len() • Lists: index 0 se start, -1 = last item, append(), len() • Chat history = ek list (AI memory ka base) • input() hamesha string return karta hai • Mini project: Prompt Builder ⏱️ Chapters 0:00 Recap & Today's Plan 1:00 Variables 3:34 Data Types & Type Conversion 7:16 Strings & f-strings 10:33 Lists 13:47 Input & Output 16:06 Code: Variables & Data Types 20:24 Code: Strings & f-strings 23:01 Code: Lists 24:37 Code: input() & Output 25:43 Mini Project: Prompt Builder 28:14 Recap & Next Video 💻 Prompt Builder code (from the video): topic = input("Topic : ") level = input("Level (beginner / expert) : ") point = input("How many points? ") prompt = f"Explain {topic} to a {level} in {point} simple points." print(prompt) print(len(prompt)) ◀️ Previous video: Python Setup for AI (Anaconda + VS Code):    • Python Setup for AI: Anaconda, VS Code & V...   ▶️ Next video: Dictionaries, Loops, Functions & Error Handling 🧪 Challenge: Prompt Builder mein ek list add karo jisme aapke 3 favourite topics hon, aur topics[0] ko prompt mein use karo. Apna code comments mein share karo! 👍 Video helpful laga ho toh Like karo, Illuminating Code ko Subscribe karo aur 🔔 bell icon press karo taaki next video miss na ho. Tab tak, keep learning, aur code ko illuminate karte raho! 💡 #Python #GenerativeAI #PythonForAI #IlluminatingCode