With an Argument
The input () function is invoked with one argument. It’s a
string containing a message.
The message will be displayed on the console before the user
is given an opportunity to enter anything.
Input () will then do its job.
The result of the input () function is a string. It’s not an
integer or a float.
So, we mustn’t use it as an argument of any arithmetic
operation.
Let’s run the following code.
We get the following error.
No comments:
Post a Comment