This repository was archived by the owner on Apr 1, 2021. It is now read-only.
Article: Python Input() Function#1031
Merged
alayek merged 5 commits intofreeCodeCamp:masterfrom May 26, 2016
meetmangukiya:working
Merged
Article: Python Input() Function#1031alayek merged 5 commits intofreeCodeCamp:masterfrom meetmangukiya:working
alayek merged 5 commits intofreeCodeCamp:masterfrom
meetmangukiya:working
Conversation
Python-Input.md
Outdated
| @@ -0,0 +1,33 @@ | |||
| # Python Input() Function | |||
|
|
|||
| Many a times, in a program we need some input from the user. Taking inputs from the user makes the program feel a bit interactive. In python, to take input from the user we have a function `input()`. Let's see some examples: | |||
Member
LGTM 👍Once you have fixed the issues, let's @koustuvsinha @atjonathan might want to take a look. |
Member
|
LGTM too, just implement the suggestions! 👍 |
|
Checking grammar... |
Python-Input.md
Outdated
| @@ -0,0 +1,41 @@ | |||
| # Python Input() Function | |||
|
|
|||
| Many a times, in a program we need some input from the user. Taking inputs from the user makes the program feel a bit interactive. In Python 3, to take input from the user we have a function `input()`. Let's see some examples: | |||
There was a problem hiding this comment.
Many a times, in Many a time, in
Taking inputs from the user makes the program feel a bit interactive. Taking inputs from the user makes the program feel interactive.
|
Other than that, LGTM 👍 |
| number = int(input('Please enter a number: ')) | ||
| ``` | ||
| [Run Code](https://repl.it/CUqX/2) :rocket: | ||
| If you enter a non integer value then Python will throw an error `ValueError`. **So whenever you use this, please make sure that you catch it too.** Otherwise, your program will stop unexpectedly after the prompt. |
Member
There was a problem hiding this comment.
give a blank line here, Run code and the next line are in the same line
Contributor
Author
|
@koustuvsinha Done. Thanks for pointing it out 👍 |
67 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds to #509