0

Can someone tell me what i did wrong?😊

name = input() age = int( input() ) print(name + "is" age +"years old.")

5th Sep 2021, 10:27 PM
Mariam ABDELREZAK
Mariam ABDELREZAK - avatar
8 Antworten
+ 2
You forgot to put a comma after "is"! Also you can't add an integer and string in python . You need to convert age into string by str(age). A better way would be to do this , print(name, " is", age, "years old.")
5th Sep 2021, 10:35 PM
Abhay
Abhay - avatar
+ 6
Mariam name = input() age = int( input() ) print(name + " is",age,"years old.") You can't concentrate a number add commas and add a space before is otherwise it will be nameis
5th Sep 2021, 10:36 PM
BroFar
BroFar - avatar
+ 2
Mariam you can write as many inputs you want but you need to provide all the inputs first time only and each on a newline.
5th Sep 2021, 10:44 PM
Abhay
Abhay - avatar
+ 1
BroFar Abhay Thank youuu♥️😊
5th Sep 2021, 10:54 PM
Mariam ABDELREZAK
Mariam ABDELREZAK - avatar
+ 1
Recently did this same exercise dont make age an integrr leave as a string. also put a plus in front of age in your output code Age = input()
6th Sep 2021, 12:38 AM
Brent Clifford
+ 1
Calvin [Inactive] Thank you😊
6th Sep 2021, 10:03 AM
Mariam ABDELREZAK
Mariam ABDELREZAK - avatar
0
But on sololearn I somehow can only write one input. So no matter how i change it, it still says its wrong
5th Sep 2021, 10:40 PM
Mariam ABDELREZAK
Mariam ABDELREZAK - avatar
0
Brent Clifford it works anyways. Thanks for your help😊
6th Sep 2021, 12:40 AM
Mariam ABDELREZAK
Mariam ABDELREZAK - avatar