+ 1
Python basic practice question Chatbot v1.0
What is the answer and explain
14 Antworten
+ 4
Abdul Wasay
name = input()
Not
name = input("enter your name")
And
print(name)
-------------------------------------------- ( two lines )
name = input()
print(name)
+ 3
Abdul Wasay ,
Show your attempt. I doubt anybody is going to just give you the answer.
+ 3
did you thy it with an empty prompt?
(just saving the user's input into a variable)
hint:
the task does not say: "enter your name" must be in the prompt
+ 2
at first: try it yourself,;
after that: link the code, and write it where did you stuck.
hint:
you need an input, and to display what is written on the prompt
+ 2
Abdul Wasay
How do you input ?
How do you store a value ?
How do you output to a console or screen ?
In the Chatbot v1.0 exercise there are only 2 instructions... These questions were covered in the previous lessons.
# Ask the user for input and store it in a variable
# Display the user input on the screen
+ 2
Abdul Wasay ,
OK. Cool. So right away, never use prompt text in calls to the input function on Sololearn.
a = input("This is prompt text.")
There are two reasons. 1. The prompt text gets printed, but the automated test cases don't expect it, and they will all fail. 2. If a regular Sololearn user runs your code, Sololearn requires them to enter all input before running the program, so they won't see the prompt until it's too late.
So only use prompt text for programs you run outside of Solearn, like in a local IDE on your computer.
You only have to have one input and one print. Each test case will run your program again and give it a new input.
+ 1
Attempt 01:
name =input('enter your name')
print(name)
name = input('enter your name')
print(name)
Attempt 02:
name =input('Tom')
print(name)
name = input('Bob')
print(name)
Attempt 03:
name =" Tom"
print(name)
name = "Bob"
print(name)
+ 1
Mihaly Nyilas i done it, thanks for helping me and also others thanks
+ 1
Abdul Wasay ,
Some people add [Solved] to the title so people know help is no longer needed.
0
What is answer? I try my best but still not solving this help me
0
Chatbot v1.0 is like the first version of a robot that can talk to people like you and me. It's designed to understand our queries and give us answers or help us do further. This version is not advanced or newer ones, but it is that where the idea of chatbots started, making it an important part of how we interact with technology today. Being a software engineer I learn new things related to technology and implement them. Currently I am learning what is splunk (https://www.igmguru.com/blog/what-is-splunk/). If you want to know about it then feel free to ask.
0
it's actually telling you to save the input in a name variable. In your above statement the 'name = input()' is suppose to get the user's input not yours and according to the question, it wants you to display the user's input. The only thing you need to do after the (#Display user input), is to write down Print(name) and it will display the user's input. Hope you understand?
0
The answer depends on the specific Python basic practice question in the Chatbot v1.0. Could you please provide more details or context so I can explain the solution accurately?
0
Abiye Gebresilassie Enzo Emmanuel
Write a program that asks the user for an input and displays it on the screen. You'll continue working on this code after the next lesson.
Task
Complete the code to ask the user for input, store it in the name variable, and display it on the screen.
Input Example
Expected Output
name = "Tom"
Tom
name = "Bob"
Bob