0

What's my mistake in the code of phython? Why does it give error?

Name = input(Whats is your name?) Age = input (What is your age?) print(Name + ' is' + Age ' years old')

28th Jan 2020, 8:08 AM
Hamzaحمزہ محبMohib
Hamzaحمزہ محبMohib - avatar
4 Réponses
+ 2
You forgot a second "+" sign. This works in Pycharm: Name = input("Whats is your name?") Age = input ("What is your age?") print(Name + ' is ' + Age +' years old')
28th Jan 2020, 8:53 AM
SushiHD
SushiHD - avatar
+ 1
You are not using quotes for the questions.
28th Jan 2020, 8:14 AM
Seb TheS
Seb TheS - avatar
+ 1
the quotes in input are missing eg name = input("your name")
28th Jan 2020, 8:14 AM
Oma Falk
Oma Falk - avatar
0
Jazakallah khair for all support, i added quotes and it worked on the app but when i used to try it on Pycharm it give error that string and something else can't be in same line, have any idea of that?
28th Jan 2020, 8:22 AM
Hamzaحمزہ محبMohib
Hamzaحمزہ محبMohib - avatar