- 1

Why is won't the is output

name=input("diego") age=input("22") print(name + " is " + age)

16th Mar 2021, 7:56 AM
Zan Diego
Zan Diego - avatar
4 odpowiedzi
+ 3
Hi! do not force values into input. write with empty brackets. the program itself will ask you to enter the values input()
16th Mar 2021, 8:04 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 3
Can you edit your question so that it can be understood.Thanks
16th Mar 2021, 8:04 AM
!Derrickee
!Derrickee - avatar
+ 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
16th Mar 2021, 8:20 AM
visph
visph - avatar
+ 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'
16th Mar 2021, 8:49 AM
ChaoticDawg
ChaoticDawg - avatar