Taking User Input in Python | Python Tutorial - Day #10
You guys rocked it in 100 Days Of Code Everyone here is with a high tempo That 's why
today I wan na tell you how you can add the 'User Input' If you interact with a program and
then it responds , so you 'll enjoy it a lot. You can also give inputs like this to your Python
programs with you own keyboard. The 'Input ' function in Python programs by-default takes
the 'String ' prompt which means it ask you about the input or message. 'String ' in 'Input '
function assigns the 'Strings ' to the variable which the user inputs. This means that 'Input
function assigns. the 'String' to the variables. The result will be 112 because 100 + 12 = 112.
But no! The output is "12100 '' Now you 'll ask 'What's going on '' ?. . . Has Python gone mad ?
'' Many people have doubts that their Python is not working No bro ! First correct yourself
What is this? " My python is not. working '' '' My computer is. not working '' Python says
'Whatever you 'll enter I 'm gon na store it as a 'String' Even if you 've entered a number
Python 's input function is not intelligent enough to detect your number and take it instead of
as a number. Python literally add those 2 'Strings' and concatenates them. If we add ' x ' & ' y
' to the input of 'x ' will be a string & y ' will also be a String' The result will be '12100 '' If we
added 'harry ' in 'harry ' so the output will be harrryrohan '' If they are 'Integers so the result is
112 Students
This is actual Ar arithmetic Operation between 2 integers. Arithmetic Operation is only
possible when both the inputs are integer. As you can see these ' x ' & ' y' were not integers
And here we 've changed them to integers. Now let me tell you another case And I 'll tell you
the solution for that in this 100 Days Of Code course. I want you to do this and show me
what is the output of a string. When we are converting them so then what 's the output I want
to show me So that 's it for this video guys. If you have n't accessed the play-list so I. want to
do so And bookmark it by clicking here and save it as a bookmark.
You guys rocked it in 100 Days Of Code Everyone here is with a high tempo That 's why
today I wan na tell you how you can add the 'User Input' If you interact with a program and
then it responds , so you 'll enjoy it a lot. You can also give inputs like this to your Python
programs with you own keyboard. The 'Input ' function in Python programs by-default takes
the 'String ' prompt which means it ask you about the input or message. 'String ' in 'Input '
function assigns the 'Strings ' to the variable which the user inputs. This means that 'Input
function assigns. the 'String' to the variables. The result will be 112 because 100 + 12 = 112.
But no! The output is "12100 '' Now you 'll ask 'What's going on '' ?. . . Has Python gone mad ?
'' Many people have doubts that their Python is not working No bro ! First correct yourself
What is this? " My python is not. working '' '' My computer is. not working '' Python says
'Whatever you 'll enter I 'm gon na store it as a 'String' Even if you 've entered a number
Python 's input function is not intelligent enough to detect your number and take it instead of
as a number. Python literally add those 2 'Strings' and concatenates them. If we add ' x ' & ' y
' to the input of 'x ' will be a string & y ' will also be a String' The result will be '12100 '' If we
added 'harry ' in 'harry ' so the output will be harrryrohan '' If they are 'Integers so the result is
112 Students
This is actual Ar arithmetic Operation between 2 integers. Arithmetic Operation is only
possible when both the inputs are integer. As you can see these ' x ' & ' y' were not integers
And here we 've changed them to integers. Now let me tell you another case And I 'll tell you
the solution for that in this 100 Days Of Code course. I want you to do this and show me
what is the output of a string. When we are converting them so then what 's the output I want
to show me So that 's it for this video guys. If you have n't accessed the play-list so I. want to
do so And bookmark it by clicking here and save it as a bookmark.