Automatically translated.View original post

🐍 Daily Python Problem: Let's practice coding. ✨

Today, let's do an interesting and often used basic problem in Python: "Vowels: a, e, i, o, u in String."

📝 Problem & Task:

Write a function named count _ vowels (text) that accepts the parameter as String. You must count all vowels in the String, including lowercase and uppercase!

💡 Solution Insight:

Can see our code. / Yes! The techniques used are:

1.Define vowel letter set vowels = 'aeiou'

2. Convert the accepted String to all lowercase with .lower () before looping (Loop) so we don't have to check the split caps! (for char in text.lower ():)

3. Use the condition if char in vowels: to check if the letter is a vowel.

4. Count + = 1 and return return return count

💖 Keep Going!

Practicing small problems like this every day will improve our coding skills very well! Check out the Output sample and try it yourself!

# Pythonlearning # data # ai # data aanalyst # learnonlemon8

2025/10/29 Edited to

... Read moreสำหรับผู้ที่เริ่มต้นฝึกเขียนโปรแกรมด้วยภาษา Python การเขียนฟังก์ชันนับจำนวนสระในสตริง เป็นโจทย์เบื้องต้นที่ดีมากในการเรียนรู้หลักการทำงานของตัวแปร เงื่อนไข และการวนลูป ซึ่งเราสามารถวางแผนได้โดยตั้งค่าอักษรสระไว้ในตัวแปรหนึ่งเพื่อใช้ตรวจสอบได้ง่ายขึ้น ฟังก์ชัน count_vowels(text) ใช้หลักการง่ายๆ ด้วยการแปลงข้อความให้เป็นตัวพิมพ์เล็กทั้งหมดก่อน จากนั้นจึงวนลูปตรวจสอบทีละตัวอักษรว่าตรงกับชุดอักษรสระที่กำหนดหรือไม่ ถ้าตรงก็ให้นับเพิ่มในตัวแปรนับ และสุดท้ายส่งค่ากลับเป็นจำนวนสระทั้งหมดในข้อความนั้น ตัวอย่างเช่น หากส่งอาร์กิวเมนต์เข้าไปเป็น "Hello World" ฟังก์ชันจะนับว่ามีสระทั้งหมด 3 ตัว คือ e, o และ o ซึ่งแสดงให้เห็นว่าการแปลงข้อความเป็นตัวพิมพ์เล็กช่วยลดความซับซ้อนในการตรวจสอบสระได้อย่างมาก นอกจากนี้ การลองทดสอบฟังก์ชันกับอินพุตต่างๆ เช่น "Python Programming" หรือ "AEIOUxyz" ก็จะทำให้เห็นว่าฟังก์ชันสามารถจัดการทั้งตัวอักษรพิมพ์เล็กและพิมพ์ใหญ่ได้อย่างถูกต้องและมีประสิทธิภาพ สำหรับผู้ที่ต้องการต่อยอด สามารถขยายความสามารถของฟังก์ชันนี้เพื่อรองรับสระภาษาไทย เช่น อะ, อา, อิ, อี, อึ, อื้อ, อุ, อู หรือรวมถึงการนับสระที่มีเครื่องหมายวรรณยุกต์ได้ เพื่อเพิ่มความแข็งแรงของโค้ดให้เหมาะกับการใช้งานในบริบทที่หลากหลาย การฝึกแก้โจทย์โค้ดพื้นฐานแบบนี้ซ้ำๆ จะช่วยให้เข้าใจหลักการเขียนโปรแกรม และสามารถปรับใช้กับปัญหาอื่นๆ ได้ดีขึ้นอย่างรวดเร็ว เป็นรากฐานที่สำคัญสำหรับการขึ้นพัฒนาทักษะไปสู่ระดับสูง ไม่ว่าจะเป็นการวิเคราะห์ข้อมูล อัลกอริทึม หรือการทำงานกับ AI และ Data Analyst ก็ตาม อย่าลืมทดลองรันโค้ดกับตัวเองเพื่อเห็นผลลัพธ์ทันที เพราะการเรียนรู้แบบมีปฏิสัมพันธ์และทดลองจริงจะช่วยให้เห็นภาพและจดจำได้ดีขึ้นมากค่ะ!

Related posts

My Programming Interest Just Skyrocketed! 🚀
I just discovered something that has made my interest in programming explode to 1000000000000000%! 🤯 🎮 Learning Programming is Like a Game Adventure! From Python, Java, JavaScript, to HTML, there are all kinds of programming languages available, along with systematic topic courses. The learning p
Valder

Valder

2140 likes

CPT Coding
Here is a practice CPT coding question question. It shows how to find the CPT code for an abdominal biopsy. The CPT book has all of the different procedure codes in it. At least one CPT code must be on every claim that you submit to the insurance company. #medicalbiller #medicalcoder #medicalc
midnightcoding

midnightcoding

880 likes

5 Hobbies Everyone Should Have🚀
1. Stay in Shape 🏃‍♂️ Staying active is essential for a healthy life! Running and gym clears your mind and keeps your heart strong, while yoga and pilates improves flexibility and brings calmness. Dancing is a fun way to stay fit, and swimming works out your whole body. Pick one and feel the energ
emilie.studygram

emilie.studygram

8811 likes

How to Learn Coding Fast Even as a Beginner
#codingforbeginners #programming #studymotivations #webdevelopment #learntocode
Aysha

Aysha

784 likes

Learn the basics of computer science & coding ✨
This book caught my eye and I don't regret purchasing it. This book is filled with bite-sized info to learn computer science and coding, and the information was also very well presented. When I shared this book one day, I got a lot of messages about the book details so I also included them here
teal.days

teal.days

1698 likes

ICD-10-CM Coding Practice
Here's a quick video showing how to find the ICD-10-CM code for congestive heart failure. This video was originally on my TikTok, and over there I do subscription videos that are more advanced and are meant for students who are getting ready to take the CPC exam. If you're interested in
midnightcoding

midnightcoding

503 likes

Medical coding student 👩🏻‍🎓
I’ve been studying medical coding for the past year and a half, and I’ll be finishing my program in two months. I’m excited to start my career and find a job working from home, where I can use my skills to help with medical records. #medicalcodingstudent #medicalcoder #workfromhomelifestyle
Ipamskii

Ipamskii

670 likes

5 coding bootcamps to kickstart your tech career 👩‍💻
1. freeCodeCamp - Duration: Self-paced - Success Rate: Well-known for helping learners build strong portfolios and get jobs. FreeCodeCamp has a vast community and provides comprehensive hands-on projects. 2. App Academy Open - Duration: 24 weeks (full-time) or 48 weeks (part-ti
vedha | career tips (tech) 👩‍

vedha | career tips (tech) 👩‍

508 likes

Learn Python in 50 Days!!
🐍If you want to learn how to code and you don't know what programming language to start with, then I would highly recommend Python! It's a super popular language in the industry and you can do so much with it. It is very beginner friendly compared to most languages and the fields you could
CompSkyy

CompSkyy

593 likes

📚 How I’m SelfTeaching Medical Coding from Scratch
Hey! 👋 I wanted to share my journey of self teaching medical coding yes, even with three kids, a packed schedule, and no prior healthcare background. If you’re thinking of diving into a new skill or career path, this might give you that little push 💪✨ 📌 Why Medical Coding? I wanted something
Jasmine Pinkk

Jasmine Pinkk

477 likes

Learning Websites to Level Up Your Skills
They make the learning journey feel less like a lecture and more like a chat with a knowledgeable friend. Codecademy – my coding guru! 🤓✨ Forget the boring textbooks; this platform brings the coding game to life with a user-friendly vibe and hands-on lessons. Learning Python, Java, or HTML? They
Reverelia

Reverelia

1437 likes

Top Free Platforms to Learn Coding
If you aren’t sure if coding it for you, there are multiple free platforms you can check out to give it a shot! I started learning how to code through the following platforms around 5 years ago, loved it and decided to major in Computer Science at University of Maryland, and am now a software engin
anjali.gama

anjali.gama

308 likes

Medical Coding Practice
Quick video showing how to find the ICD-10-CM code for chronic kidney disease. Form more information on medical coding Please see my website. Link in bio. #medicalcoding #medicalcoder #medicalcodingcourse #aapc #cpc
midnightcoding

midnightcoding

33 likes

6 Free Online Certifications to Boost Your Resume
Hi, lemons! In today's dynamic job market, having the right certifications can significantly enhance your resume and set you apart from the competition. The six free online courses recommended cover a diverse range of skills essential for professional growth and career advancement. ✨️ Course
Lifestyle Babe

Lifestyle Babe

2246 likes

8 Free Online Certifications to Boost Your Resume
Hi, lemons! In today's competitive job market, having the right certifications can make a significant difference in showcasing your skills and expertise. Online certifications are not only convenient but also cost-effective. Here are six free online certifications that can give your resume a va
Lifestyle Babe

Lifestyle Babe

1214 likes

learn how to code for FREE! 💻
learning to code for free has never been easier with coddy.tech! 🌟 whether you're a complete beginner or looking to enhance your skills, coddy.tech offers a range of resources to help you on your coding journey. here's how you can get started: explore coding courses: coddy.tech provides
sanae ☕️

sanae ☕️

1406 likes

Best app to Learn Coding
Looking for the best app to learn coding without spending thousands on bootcamps or wasting hours on random YouTube tutorials? 📱👨‍💻 Let me save you the search: BootSelf is a game-changer for beginners. This app gives you: ✅ A 24/7 AI coding mentor — ask anything, anytime ✅ Real-time code exp
Code with BootSelf AI

Code with BootSelf AI

282 likes

Top Free Websites to LearnCoding in 2025 (No Cost)
Want to learn coding without spending a dime? These free coding websites will help you kickstart your tech career! From beginner-friendly tutorials to full-stack roadmaps and real projects, these platforms offer everything you need #codingforbeginners #freecodingresources #webdevelopment #t
Aysha

Aysha

81 likes

how I got started learning Python 🐍💻👾
I’ve been learning Python this summer to prepare for my research lab and courses in the fall. Programming isn’t required for my major, so I’m taking the time to learn it alone. The biggest tip I can give is specific goals from the beginning! Speaking from experience, this will save a lot of time an
reagan

reagan

41 likes

Major-Specific Strategies to Achieve a ✨4.0 GPA✨🎓🧠
🎓1. Business & Management Majors (Business Management, Accounting, Finance, Economics) ✅Active Participation: Example: In a Marketing class, when discussing a case study like Coca-Cola’s rebranding, share your analysis of the marketing mix (4Ps). This not only engages you in the materi
Chalie_Baker

Chalie_Baker

6986 likes

ICD -10-CM Coding Practice
Medical coders use the ICD-10-CM book to find diagnosis codes. There are thousands of different codes. There are many rules and guidelines that a coder needs to understand :) The examples that I post are for people to just learn and see the basics. If you want to become a medical coder, my next
midnightcoding

midnightcoding

496 likes

Step 6: Coding ICD-10-CM
Check for “Excludes” notes In the Tabular: Excludes1 = NEVER code both together (mutually exclusive). Excludes2 = Both can be coded if both apply (the condition listed is not part of the first one). Why you care: this prevents you from double-coding something that’s clinically the same thing
Melea King

Melea King

31 likes

this cute app can teach you how to code python
ive always wanted to learn how to code more than html and css, something on the complex side. it always has seemed intimidating until i stumbled upon this game/app where the task are gamified, so its seems more fun to explore rather than formal courses. are you willing to give it a shot? #l
yuuki

yuuki

387 likes

Easy Coding Projects!!
If you want to learn how to code then these are the perfect beginner projects! Here are some fun and easy projects to build your skills: To-Do List App: Create a simple app where you can add, edit, and delete tasks—perfect for practicing JavaScript or Python. ✅ Personalized Calculator: Build a
CompSkyy

CompSkyy

170 likes

Engineering an ADHD Coding Setup
As an Engineering ADHDer, I learned the hard way that a clutter-free workspace can make or break my focus 🌟. Too much going on around me? Instant distraction. The worst part is regaining that same level of focus. So, I keep my setup minimal—just the essentials like my laptop, my iPad Air, and y
Michael Burbank

Michael Burbank

140 likes

Medical Billing and coding
Color coding has saved my behind with coding! There are SO many codes, and so many sections to go through! The billing cycles ESPECIALLY!!! I resorting form different colored pens, to different colored highlighters so they don’t all run together when reading! Highly…HIGHLY recommend a color
Ashley 💜💋

Ashley 💜💋

426 likes

Coding and Billing
Learning coding ! #medicalschool #medicalcoding #medicalbilling #schoolnotes
Shanel red

Shanel red

97 likes

5 Learn to Code Sites You Haven’t Heard Of
If you’re learning computer programming and want to know where to find FREE intermediate resources…here are some that I like! Let me know if you’ve used any. 1. FullStackOpen Free courses focused on building web apps. They teach React Native, GraphQL, Typescript, Containers and Database
Study Seal

Study Seal

239 likes

ICD-10-CM Coding Practice
This is a quick tutorial showing how to find a code in the ICD-10-CM book. If you want to learn more and become a medical coder, my next medical coding training course is available for sign up. It is a 16-week program that will prepare you to take the CPC exam from AAPC. L!nk in b!o. #medicalcodi
midnightcoding

midnightcoding

187 likes

Bible color coding
Here’s the colors I use in my Bible and what I use them for #acolorfulbible #biblejournaling #biblestudy #christiangirl
Tansi Boyce

Tansi Boyce

123 likes

How To Prep For Your Coding Interview!
Coding interviews can feel super intimidating, but the right prep strategy can make all the difference. Whether you’re a beginner or brushing up for your next big opportunity, here are some tips to help you crush it. Practice problems daily. Platforms like HackerRank, LeetCode, and Codeforces ar
CompSkyy

CompSkyy

31 likes

medical coding journey
Starting a new journey into medical coding. scared but excited 🙃 who else is starting this month? #medicalcodingjourney #coding #newstudent #aapc #smcacademy
Lilyesp

Lilyesp

27 likes

Unique Coding Projects You NEED In Your Portfolio!
Want to make your portfolio stand out? Here are some unique coding projects that showcase your skills and creativity: Expense Tracker: Build a personal finance tracker to monitor spending, categorize expenses, and visualize budgets with graphs. 💰 Habit Tracker App: Create an app to log daily ha
CompSkyy

CompSkyy

80 likes

How I Studied Medical Billing & Coding From Home
How I Studied Medical Billing & Coding From Home With Just Two Books and No Healthcare Background Two years ago, I decided to study medical billing and coding from home. I had no healthcare experience. No idea what CPT or ICD-10 even meant. I just knew I needed a job I could do remotely —
𝓒𝓪𝓲𝓽𝓵𝔂𝓷

𝓒𝓪𝓲𝓽𝓵𝔂𝓷

539 likes

6 Free Online Certifications to Boost Your Resume
Hi, lemons! In a rapidly evolving job market, standing out can be a daunting task. Thankfully, online platforms have leveled the playing field, offering a wealth of world-class certifications—for free! Did your eyes just light up? They should have! Today, I'm happy to reveal six free online cer
Lifestyle Babe

Lifestyle Babe

390 likes

Medical Coding Q&A
My Most Frequently Asked Questions! #medicalcoding #medicalcoder #medicalbillingandcoding #qanda #medicalcodingstudent
MedicalCodingWithKelle

MedicalCodingWithKelle

75 likes

Cutie apps to help you study📚🎀
Learning sometimes can be boring and tough to stick with, but with these cutie apps, it’s a whole lot more fun!😊🥰🥳 #lemon8partner #studytips 👛 Zogo • Breaks down complcated firancial topics into fun bie-sized modutes. • Improves your financial literacy and teaches you how money really work
Aura✨

Aura✨

2871 likes

3 Things your coding mentor never told you
3 Things Your Coding Mentor Never Told You …and it’s probably why you're still stuck or burning out. Let’s be honest: learning to code sounds exciting… until you hit error after error, feel completely lost, and wonder if you’re even cut out for this. If you're learning on your own or
devswitchwithai

devswitchwithai

15 likes

medical coding practice
Find the ICD-10-CM code for family history of diabetes. #medicalcoding #medicalcoder #medicalcodingcourse
midnightcoding

midnightcoding

82 likes

Sites for CS Students!
Learning computer science can feel like drinking from a firehose sometimes, but the right resources make all the difference. Whether you’re debugging code, prepping for interviews, or diving into data science, these websites are absolute must-haves. GitHub is your go-to for managing projects and
CompSkyy

CompSkyy

211 likes

Coding Languages for Beginners!
These were my first coding languages! 👩‍💻 Also CSS!! It pairs perfect with html. I left it off the list just because of how it works with html, they go hand in hand! Get out and start coding👾 #code #learntocode #codingstudent #coding #embracevulnerability
LOLLIPOPAK

LOLLIPOPAK

360 likes

I stopped Googling every coding error ..
Tired of copying error messages into Google and hoping for answers that make sense? I was too—until I found a solution that changed everything. ✨ Introducing BootSelf — a powerful AI coding mentor that actually explains things like a human would, helps you write code, fix it, and learn smarter
Code with BootSelf AI

Code with BootSelf AI

14 likes

ICD-10-CM coding practice
Here is a quick video showing how to find the code for sprained ankle in the ICD-10-CM book. If this app gets banned you can find all of my coding tutorials on Yo*Tube. #coding #medicalcoding #medicalcoder #medicalcodingcourse
midnightcoding

midnightcoding

191 likes

Top 5 Coding YouTube Channels for Beginners
Want to learn coding but don’t know where to start? These 5 YouTube channels are perfect for beginners! Whether you’re into web development, Python, or full-stack programming, these channels offer free, high-quality tutorials to help you get started #learntocode #codingforbeginners #webdevelop
Aysha

Aysha

27 likes

Beginner Friendly Tips For Learning Python for Dat
If I was to learn Python for Data Analysis as a beginner, I would start with the basics, I would learn: Variables Data Types Loops and Functions. There's no Python without libraries and these are the most used for Data Analysis: 👉 Pandas - Data Manipulation 👉 Numpy - Numerical Comput
NeLo

NeLo

76 likes

🔥 Assign Multiple Values in Python (Easy!)
🔥 Assign Multiple Values in Python (Easy!) Assigning multiple values in Python makes your code shorter, cleaner, and more readable 💻 Perfect trick for beginners and interview prep 🚀 Save this post and follow for daily Python tips 🐍 #Python #LearnPython #PythonBasics #PythonTips
TechKeysX

TechKeysX

0 likes

The One Where We Get Better at Coding!
It's 2025 and we need to IMPROVE our coding skills girl! Here's how I'm doing it: 1️⃣ Solve a Simple Algorithm I hop onto platforms like LeetCode or HackerRank and pick a beginner-friendly problem. It’s not just about solving it but learning how to break the problem down into smalle
CompSkyy

CompSkyy

133 likes

See more