Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/user_input/test_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
@see https://docs.python.org/3/library/functions.html#input

User input prompts are very helpful when it comes to interactive programming. Not only in games but also in standard file operations, you may want your user to interact with the program.
Therefore, the user needs the opportunity to be able to put in information.
Therefore, the user needs the opportunity to be able to put in information. The user input in this example is saved in a variable and then displayed using that variable.
"""


def user_input():
"""Input prompt"""

# Printing statement to signal the user that we are waiting for input.
user_input = input("Please type in your name\n")
user_input = input("Please type in your name: \n")

# Printing a message based on the input.
print(f"Welcome, {user_input}!")