Sep 23, 2024
print function outputs text to the console (standard output).input function reads data from standard input, typically what a user types into the console.input("Enter your age") prompts the user and waits for input.my_name = "Rubeus Hagrid").input for later use.your_name = input("Enter your name") stores input in your_name.identifier = value.my_age = 60 assigns the integer 60 to my_age.print("Hello, World!") uses a literal string.print can accept multiple arguments separated by commas.
print(var1, "text", var2) prints values in sequence, separated by spaces.print(your_name) prints the value of your_name.print("Age:", my_age, "Name:", my_name) prints values and strings in order.input and print functions enhances interaction with users and data management.