0
Hello, how do you provide 2 inputs and get the code to print 2 outputs ??
I was asked to ask the user for input , store it in the name variable and to display it on the screen. The example were: Input example: name="Tom" name="Bob" Expected output: Tom Bob
5 Answers
+ 4
Isimbi Fany ,
> please add some more information if your question is related to a sololearn tutorial:
> tutorial name, module name, lesson or exercise name.
+ 4
Isimbi Fany ,
if your question is about the `introduction to python` tutorial, module 2, practice `chatbot v1.0`:
> you may be confused by the samples that are used in the tutorial.
> what you should do is:
> take *one* input (name) as requested, store it in a variable
> output this variable
+ 2
Isimbi Fany
Learn how to take inputs in python and print that.
https://www.sololearn.com/post/1159836/?ref=app
+ 1
I fixed it.
# The two names must be unique.
name1 = "Tom"
name2 = "Bob"
# Display on screen
print(name1)
print(name2)
0
You could try and make an array, store both inputs, and then display them
Or you could have the second input add to what the input name already was
Example:
Input
name=âTimâ
name=âRobâ
Output
Tim + Rob