Understanding Python's input() Function

🚀 Day 20 of Learning Python – Understanding the input() Function Today I learned how Python takes user input using the input() function. This function allows a program to interact with users by accepting data during runtime. 🔹 input() pauses the program 🔹 Waits for the user to type something 🔹 Stores the entered value as a string 📌name = input("Enter your name: ") print(f"Hello {name}") fav1 = input("What is your favourite company? ") fav2 = input("What is your target role? ") print(f"Do you want to join {fav1} for {fav2} position?") 💡What’s happening here: • The program asks questions • Stores user responses in variables • Uses those values to create a fun, dynamic output ✨ This makes programs more interactive and user-friendly! #Python #LearningPython #LearnToCode #PythonBasics #CodingJourney #PythonJourney #Input #Day20

To view or add a comment, sign in

Explore content categories