Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 19353f7

Browse files
committed
Add Input.
1 parent 25e6b2a commit 19353f7

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

‎README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ written correctly.
111111
- [Packages](src/modules/test_packages.py)
112112
8. **Errors and Exceptions**
113113
- [Handling Exceptions](src/exceptions/test_handle_exceptions.py) (`try` statement)
114-
- [Raising Exceptions](src/exceptions/test_raise_exceptions.py) (`raise` statement)
114+
- [Raising Exceptions](src/exceptions/test_raise_exceptions.py) (`raise` statement)
115115
9. **Files**
116116
- [Reading and Writing](src/files/test_file_reading.py) (`with` statement)
117117
- [Methods of File Objects](src/files/test_file_methods.py)
@@ -126,7 +126,7 @@ written correctly.
126126
- [Dates and Times](src/standard_libraries/test_datetime.py) (`datetime` library)
127127
- [Data Compression](src/standard_libraries/test_zlib.py) (`zlib` library)
128128
12. **User input**
129-
- [Terminal input](src/user_input/test_input.py) from users to interact with the program
129+
- [Terminal input](src/user_input/test_input.py) (`input` statement)
130130

131131
## Prerequisites
132132

‎src/user_input/test_input.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""User input
22
3-
# @see https://docs.python.org/3/library/functions.html#input
3+
@see https://docs.python.org/3/library/functions.html#input
44
55
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.
66
Therefore, the user needs the opportunity to be able to put in information.
@@ -10,8 +10,8 @@
1010
def user_input():
1111
"""Input prompt"""
1212

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

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

0 commit comments

Comments
 (0)