Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 19353f7

Browse filesBrowse files
committed
Add Input.
1 parent 25e6b2a commit 19353f7
Copy full SHA for 19353f7

File tree

Expand file treeCollapse file tree

2 files changed

+6
-6
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+6
-6
lines changed
Open diff view settings
Collapse file

‎README.md‎

Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
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

Collapse file

‎src/user_input/test_input.py‎

Copy file name to clipboard
+4-4Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.