🧠 Don’t miss out! Get FREE access to my Skool community — packed with resources, tools, and support to help you with Data, Machine Learning, and AI Automations! 📈 https://www.skool.com/data-and-ai-aut...
Want to make your Python programs interactive? In this quick and beginner-friendly tutorial, you’ll learn how to take user input in Python, process it, and use it in real-world scenarios—all in just 15 minutes!
🚀 Hire me for Data Work: https://ryanandmattdatascience.com/da...
👨💻 Mentorships: https://ryanandmattdatascience.com/me...
📧 Email: [email protected]
🌐 Website & Blog: https://ryanandmattdatascience.com/
🖥️ Discord: / discord
📚 *Practice SQL & Python Interview Questions: https://stratascratch.com/?via=ryan
📖 *SQL and Python Courses: https://datacamp.pxf.io/XYD7Qg
🍿 WATCH NEXT
Python for Data Analyst and Scientists Playlist: • Python Tutorials For Data Analysts and Sci...
Validate User Input: • Python Input Validation Explained in 20 Mi...
Python Regular Expressions: • Master Python Regular Expressions in 1 Hou...
Python Args & Kwargs: • Master Python ARGS and KWARGS in 25 Minute...
In this video, I break down everything you need to know about Python user input through five practical examples. We start with the basics by taking in someone's name, then add complexity by casting input to integers and floats, explore evaluating mathematical expressions, and finish with a while loop example where we continuously take in user input until the user decides to exit.
You'll learn how to properly use the input() function, cast strings to integers and floats, use eval() for quick calculations, and build interactive programs with while loops. I also demonstrate a real-world distance tracking application that adds up weekly running miles with user input validation. By the end of this tutorial, you'll understand when to use different input methods and how to avoid common pitfalls like trying to add numbers to strings before casting them properly.
This is part of my complete Python tutorial series, so make sure to subscribe and check out my upcoming video on input validation to take these concepts even further.
In this video, I break down everything you need to know about Python user input through five practical examples. We start with the basics by taking in someone's name, then add complexity by casting input to integers and floats, explore evaluating mathematical expressions, and finish with a while loop example where we continuously take in user input until the user decides to exit.
You'll learn how to properly use the input() function, cast strings to integers and floats, use eval() for quick calculations, and build interactive programs with while loops. I also demonstrate a real-world distance tracking application that adds up weekly running miles with user input validation. By the end of this tutorial, you'll understand when to use different input methods and how to avoid common pitfalls like trying to add numbers to strings before casting them properly.
This is part of my complete Python tutorial series, so make sure to subscribe and check out my upcoming video on input validation to take these concepts even further.
TIMESTAMPS
00:00 Introduction to Python User Input
00:52 Example 1: Simple String Input
02:58 Example 2: Casting as Integer
05:17 Example 3: Casting as Float
07:22 Example 4: Using Eval for Math
08:56 Example 5: While Loop with User Input
13:52 Recap and Summary
OTHER SOCIALS:
Ryan’s LinkedIn: / ryan-p-nolan
Matt’s LinkedIn: / matt-payne-ceo
Twitter/X: https://x.com/RyanMattDS
Who is Ryan
Ryan is a Data Scientist at a fintech company, where he focuses on fraud prevention in underwriting and risk. Before that, he worked as a Data Analyst at a tax software company. He holds a degree in Electrical Engineering from UCF.
Who is Matt
Matt is the founder of Width.ai, an AI and Machine Learning agency. Before starting his own company, he was a Machine Learning Engineer at Capital One.
*This is an affiliate program. We receive a small portion of the final sale at no extra cost to you.