🚀 Day 24 – pow() in Python Today I explored the pow() function in Python! print(pow(2, 3)) 🔹 Use: Power calculation 🔹 pow(2, 3) means 2 raised to the power of 3 🔹 Output: 8 The pow() function is an alternative to the exponent operator (**). So, pow(2, 3) is the same as 2 ** 3. It’s a simple yet powerful function that makes mathematical operations clean and readable in Python. 🧮 Excited to keep building strong fundamentals one function at a time! #Python #30DaysOfCode #CodingJourney #LearnPython #Programming
Python pow() function explained
More Relevant Posts
-
Learn in Public — Day 14 Today I solved the Subset Array Problem using three different approaches in Python. Problem: Check whether array b is a subset of array a. Approaches I implemented: 1️⃣ Brute Force Check each element of b in a Time Complexity: O(m × n) 2️⃣ Sorting + Two Pointers Sort both arrays and compare Time Complexity: O(m log m + n log n) 3️⃣ Hash Set (Optimal) Convert array a into a set Check membership in O(1) Time Complexity: O(m + n) Key Learning: Whenever fast lookup is needed, hashing is often the best approach. #LearnInPublic #Python #DSA #CodingJourney
To view or add a comment, sign in
-
-
🐍 Python f-strings are one of the cleanest features in the language. Stop writing this: "Hello, " + name + "! You are " + str(age) + " years old." Start writing this: f"Hello, {name}! You are {age} years old." That's it. Prefix your string with f and wrap variables in {}. ✅ Readable ✅ No type conversion needed ✅ Faster than .format() and % formatting If you're still using + for string concatenation in 2026 — this post is for you. Drop a 🐍 if you learned Python before f-strings existed. #Python #Programming #SoftwareDevelopment #CodingTips #LearnPython
To view or add a comment, sign in
-
💫A simple but powerful Python logic: Palindrome Check🌟 💥A string is a palindrome if it reads the same forward and backward. Examples: radar level madam Python makes this extremely simple: word = "radar" if word == word[::-1]: print("Palindrome") else: print("Not a Palindrome") The trick here is: [::-1] reverses the string. So we simply compare: original string == reversed string This concept is commonly used in: Coding interviews String manipulation problems Algorithm practice Sometimes the smartest solution is also the simplest. What was the first string problem you solved in Python? #Python #Programming #Coding #Learn ToCode #PythonLearning #Developer #Software Engineering
To view or add a comment, sign in
-
-
📘 Python MahaRevision – Chapter 2 Complete! Continuing my revision journey, today I covered: 🔹 Variables in Python 🔹 Data Types (int, float, string, boolean, etc.) 🔹 Type checking and type casting Understanding how data is stored and manipulated is one of the most important foundations in programming—and this chapter really helped reinforce that 💡 🧠 Practice Set Done! I solved questions based on: • Declaring and updating variables • Identifying data types • Performing type conversions • Simple input/output problems Consistency is the goal, and small steps like these are building strong fundamentals 🚀 More chapters coming soon—stay tuned! #Python #CodingJourney #LearningInPublic #Programming #Tech #Consistency
To view or add a comment, sign in
-
🎮 Rock Paper Scissors – Python Another step forward in my Python learning journey. This time I built a Rock Paper Scissors game in Python where the user plays against the computer in the terminal. The game keeps track of the score, validates user input, and allows the player to continue playing multiple rounds. I also focused on making the interaction smoother by guiding the user whenever an invalid input is entered. 🧠 Concepts practiced in this project: • Python lists • Conditional logic • While loops • Random module • Input validation and user interaction 🎮 Try the game: 🔗 Live Demo (Replit): https://lnkd.in/gwJ6C9tP 💻 GitHub Repository: https://lnkd.in/gjkJwvEX Always learning, one small program at a time. 💻 #Python #CodingJourney #LearningToCode #BeginnerProgrammer #100DaysOfCode
To view or add a comment, sign in
-
Poll Insight: Which data type does not allow duplicate values? The correct answer is Set ✅ A Set stores only unique elements, meaning duplicate values are automatically removed. That’s why sets are useful when you want to keep only distinct values in Python. 👉 Example use cases include removing duplicates from a list or storing unique items. #Python #LearnPython #CodingQuiz #ProgrammingBasics
To view or add a comment, sign in
-
Day 19 of my 20 Day Linkedin Challenge I recently learned about loops in Python. Here’s the simplest way to understand them: A loop tells the computer to repeat something. Instead of writing the same instruction multiple times you write it once and let the loop handle the repetition. For example: If you want to print numbers from 1 to 10, You don’t write 10 separate lines. You use a loop. This matters because computers are great at repetition. Loops allow you to: - save time - reduce errors - handle large tasks efficiently It’s one of those concepts that seems small but it’s actually very powerful. #AfricaAgility #ArtificialIntelligence #Python #MachineLearning #GIT20DayChallenge
To view or add a comment, sign in
-
#Day 6–7 of My Python Journey | #100DaysOfCode Diving deeper into Python fundamentals and exploring the power of strings 1. Practiced string operations and concatenation 2. Learned indexing (accessing characters using position) 3. Used loops (for loop) to iterate through strings 4. Explored string slicing to extract parts of a string 5. Understood how to use negative indexing & length functions One cool realization - Strings are more powerful than they look — from simple text to data manipulation, everything starts here! Step by step, building strong fundamentals for future projects #Python #100DaysOfCode #CodingJourney #LearnToCode #Programming #DeveloperJourney #TechSkills
To view or add a comment, sign in
-
-
Built a Snake-Water-Gun Game using Python! A fun project to strengthen my logic-building and problem-solving skills. I created a simple command-line game where: User plays against the computer Random logic is used for computer choices Game rules (Snake 🐍, Water 💧, Gun 🔫) are implemented using conditions Includes input validation functionality 💡 Skills: Python | Conditional Logic | Dictionaries | Random Module | Problem Solving This project helped me improve: Decision-making logic in code Writing clean and readable Python Understanding mappings using dictionaries Feedback is welcome #Python #Coding #SoftwareDevelopment #TechCareers #LearningPython
To view or add a comment, sign in
-
Day 3 of learning Python in public 🚀 Today I focused on understanding Python Strings and how text data is handled in programming. Key things I learned: • String indexing and slicing • Negative indexing • String immutability • f-strings for formatting • Important string methods like strip(), split(), join(), replace(), find(), and count() • Validation methods such as isdigit() and isalpha() One important takeaway is that most real-world string manipulation relies on a small set of powerful methods. Building strong fundamentals step by step. #Python #LearningInPublic #Programming #DataScienceJourney
To view or add a comment, sign in
-
Explore related topics
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development