Python Input and Type Casting Basics

Day 10 of my 90-Day Python Learning Challenge 🐍 Today I learned how to take user input in Python and how type casting works. This is an important concept because it allows programs to interact with users and convert data into the required type. What I learned today: • How to take input using the "input()" function • Understanding that "input()" returns data as a string by default • Converting data types using type casting (int(), float(), str()) • Writing small programs that take input from users and perform operations Here is a small example I practiced: name = input("Enter your name: ") age = int(input("Enter your age: ")) print("Hello", name) print("Next year your age will be:", age + 1) Learning how to take input from users makes programs more interactive and practical. Step by step, I’m building stronger Python fundamentals. Day 10/90 — Consistency is the key to growth 🚀 #Python #90DaysOfCode #LearningInPublic #CodingJourney #Programming

  • text

To view or add a comment, sign in

Explore content categories