+ 6

Need help on chatbotV1.0

There are 3 tests on this and I can not figure out how to code to get each name in each different test space Supposed to be test#1 “Tim” Test #2 “Alice” And test number 3 “Bob” Everytime I try to code it all three names go under eachother in each test space nothing is in their separate test spaces how do I solve ? Please help

15th May 2023, 6:07 PM
Sarah Maggiore
42 odpowiedzi
+ 9
I just got it! I was making it way too complicated the answer code was Name= input() Print(name) And that filled all correct spaces to their correct names i did not need to write as many codes as i did ! Thank you so much for helping me through this to the best you could for what i was giving!
15th May 2023, 9:14 PM
Sarah Maggiore
+ 7
Shireen Begum # Take the name as input name = input() # Use concatenation to join 2 strings message = "Nice to meet you, "+ name # Display the message to the user print(message)
16th May 2023, 4:50 AM
Sarah Maggiore
+ 6
Hi, I found the solution here you are: I don't know if it is the best way, but at least it works. Good luck: name = input() if name == "Tom": print("Tom") if name == "Alice": print("Alice") if name ==("Bob"): print("Bob")
17th Jun 2023, 6:59 PM
Peblardo
+ 3
# Ask the user for input and store it in a variable name = ("Tom") name2 = ("Alice") name3 = ("Bob") # Display the user input on the screen print(name) print(name2) print(name3) This is also another way (i erased input because it was putting the name tom 2 times)
15th May 2023, 8:22 PM
Sarah Maggiore
+ 2
I believe i am in python
15th May 2023, 7:15 PM
Sarah Maggiore
+ 1
I just started coding for the first time last night this is my firat app i got 3 others so im very new. I understood everything else this is the first problem that i am stumped on
15th May 2023, 7:16 PM
Sarah Maggiore
+ 1
No they are not when it goes to the results side it says test#1 and that box should be “Tom” then it goes to test#2 which that box should be “Alice” Then test#3 should be “Bob” Each needs an input and output but when i put more than one input it says everything except the 1 input “can not be definied” so i just have no idea what else to so based off of what ive learned so far to break these names up to get them into their correct test spaces without all 3 names going into the same test space
15th May 2023, 7:45 PM
Sarah Maggiore
+ 1
# Ask the user for input and store it in a variable name = # Display the user input on the screen This is where its asking me to code
15th May 2023, 7:54 PM
Sarah Maggiore
0
It's a little hard to tell what you mean exactly, better maybe to copy the exact expected and actual outputs so we can see for ourselves. That said it kinda sounds like one problem you're having might be with the way the sololearn playground handles inputs. It only takes everything all at once at the beginning, but you can separate multiple different inputs on separate lines, like eg: Tim Alice Bob
15th May 2023, 7:49 PM
Orin Cook
Orin Cook - avatar
0
https://sololearn.com/coach/963193144/?ref=app This is the explanation of what needs to he done ill also copy the first page if the practise page
15th May 2023, 7:53 PM
Sarah Maggiore
0
https://sololearn.com/coach/963193144/?ref=app I left the results empty which is obviously why its saying its wrong this time but this is how it needs to be put in, in the results
15th May 2023, 7:56 PM
Sarah Maggiore
0
Thank you im still having the same problem its saying im asking for two inputs but only one is defined is this a computer problem? I just dont know what other way to put this in… is there a way i can also contact sololearn and maybe find out more ? I still appreciate any help anyone is willing to give me
15th May 2023, 8:05 PM
Sarah Maggiore
0
Ive been trying to write codes a few different ways. I posted a link thats empty. Ill try again to write the code and ill post a new link maybe you can help with the errors im making
15th May 2023, 8:13 PM
Sarah Maggiore
0
https://sololearn.com/coach/963193144/?ref=app Im gonna do it 1 more way ive tried and post that link also
15th May 2023, 8:16 PM
Sarah Maggiore
0
This link doesn't work either. Write the code here, it will be easier.
15th May 2023, 8:18 PM
kurt
kurt - avatar
0
https://sololearn.com/coach/963193144/?ref=app When i do it this way this is where it gives me the “your code asks for input twice but only one input is defined”
15th May 2023, 8:18 PM
Sarah Maggiore
0
Okay sorry i will now
15th May 2023, 8:18 PM
Sarah Maggiore
0
# Ask the user for input and store it in a variable name = input(); name2 = input(); name3 = input() name = "Tom" name2 = "Alice" name3 = "Bob" # Display the user input on the screen print(name) print(name2) print(name3) (This is one way ive tried)
15th May 2023, 8:19 PM
Sarah Maggiore
0
Hmm, what you wrote now without error
15th May 2023, 8:23 PM
kurt
kurt - avatar
0
So when i erased input i dont get an error but the names do not go in the correct test spaces. They all go into each test space they should be 3 names in 3 seperate test spaces
15th May 2023, 8:24 PM
Sarah Maggiore