Lecture # 8 - Accepting User Input

Lecture # 8 - Accepting User Input

Accepting User Input in Python.

Accepting User Input:

Accepting user input in Python is quite straightforward. You can use the input() function to prompt the user for input.

Syntax:

input("Input Something: ")

Output:

Example:

day = input("What day is today?")
print("Today is", day)

In the above code the variable day will store the day of the week that the user enters.

Output: