+ 2

any body know the answer : Input example Expected Output name ="Tom" Tom name ="Bob" Bob # Ask the user for input and sto

any body know the answer : Input example Expected Output name ="Tom" Tom name ="Bob" Bob # Ask the user for input and store it in a variable name = # Display the user input on the screen my answer wrong ? # Ask the user for input and store it in a variable name = input("Enter your name: Tom") # Display the user input on the screen print(name)

4th Aug 2024, 12:33 PM
Imam Qori
Imam Qori - avatar
3 ответов
+ 2
yes, I know the answer.... look carefully on the task! does the task require you to print anything when you are asking for an input?
4th Aug 2024, 1:18 PM
Mihaly Nyilas
Mihaly Nyilas - avatar
+ 1
Imam Qori , we only need 2 lines of code: (1) take an input from user and store it in the variable `name` do not any output / prompt in this line. (2) output the user input that is stored in the variable `name`.
4th Aug 2024, 6:50 PM
Lothar
Lothar - avatar
0
# Ask the user for input and store it in a variable name = input() # Display the user input on the screen print(name)
9th Sep 2024, 10:33 AM
Budhabhushan Waghmare
Budhabhushan Waghmare - avatar