Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ written correctly.
- [Mathematics](src/standard_libraries/test_math.py) (`math`, `random`, `statistics` libraries)
- [Dates and Times](src/standard_libraries/test_datetime.py) (`datetime` library)
- [Data Compression](src/standard_libraries/test_zlib.py) (`zlib` library)
12. **User input**
- [Terminal input](src/user_input/test_input.py) from users to interact with the program

## Prerequisites

Expand Down
17 changes: 17 additions & 0 deletions src/user_input/test_input.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"""User input

# @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.
"""


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")

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