How can you accept user input in Python? Explain with the help of an example.
Answers
Answered by
1
Answer:
input() function is used for accepting user input in python
a = input( )
user input will be stored in variable.
Thanks^∆^......
Answered by
0
Python allows for user input.
That means we are able to ask the user for input.
The method is a bit different in Python 3.6
Explanation:
- Python 3.6 uses the input() method.
username = input("Enter your name:")
print("name is: " + username)
when you run the program it will ask you
- Enter your name:
it means your program is working
Attachments:
Similar questions
Physics,
6 months ago
Hindi,
6 months ago
Math,
11 months ago
Social Sciences,
11 months ago
Biology,
1 year ago