- 1
Why is won't the is output
name=input("diego") age=input("22") print(name + " is " + age)
4 Respuestas
+ 3
Hi! do not force values into input. write with empty brackets. the program itself will ask you to enter the values
input()
+ 3
Can you edit your question so that it can be understood.Thanks
+ 2
input could take an argument, but it is used to display a message before waiting for a user entered value...
name=input("what is your name?")
print("welcome",name)
however, in sololearn playground you did not see the message(s) before entering inputs, so usually we just put blanck input (no arguments), especially in end of module projects, where output doesn't expect to have such string in it ;P
+ 2
If you want to give the variables default values when no input is received you can do the following;
name = input() or 'diego'
age = input() or '22'