+ 1

What is input used for in python

Well I didn’t understand it

1st Dec 2024, 9:49 AM
Justpython
Justpython - avatar
2 RĂ©ponses
+ 7
Justpython , the input() function is used to take input value from the user. However This function reads input line and converts it into string and returns the text output. For eg; word = input() print(word) input : John Output : John
1st Dec 2024, 9:53 AM
Suparna Das
Suparna Das - avatar
+ 6
Justpython In Python, input() is a built-in function that allows you to get data from the user during the execution of a program. It prompts the user to enter some information (like text or numbers) and returns what they type as a string. Here’s how it works: Example: name = input("Enter your name: ") print("Hello, " + name + "!") When the program runs, it will show Enter your name: on the screen. The user can type something, like "Coder Kay" The program will then store that input in the name variable, and print a message like: "Hello, Coder Kay!"
1st Dec 2024, 10:25 AM
Coder Kay
Coder Kay - avatar