Hello everyone! I am new with py and I was traying a simple code but send me a error... I need some help. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Hello everyone! I am new with py and I was traying a simple code but send me a error... I need some help.

https://code.sololearn.com/c1D53p4Ev8Zv/?ref=app

30th Apr 2023, 5:14 PM
Jonathan Vasquez
Jonathan Vasquez - avatar
17 Answers
+ 8
En tu código no hay ningún error, recuerda que las entradas en SoloLearn deben ser en diferentes líneas, no dejando espacios
30th Apr 2023, 5:16 PM
NinjaGamer
NinjaGamer - avatar
+ 10
Jonathan Vasquez , Give name and age in seperate line before hitting submit button... Like this, Name Age Then run the code by hitting sumbit button...
30th Apr 2023, 5:56 PM
Riya
Riya - avatar
+ 7
You're welcome Jonathan Vasquez !!!
30th Apr 2023, 6:52 PM
Riya
Riya - avatar
+ 2
The code works well, you need to enter: Name Age
30th Apr 2023, 5:23 PM
Solo
Solo - avatar
+ 2
name,age = input().split() print("your name is " + name + " and your age is " + str(age)) # input name and age with space #example #Riya 11
30th Apr 2023, 6:20 PM
Smith Welder
Smith Welder - avatar
+ 2
Brother your code is right it is running.But you don't no how to run . Here I explain how to run run your code 1. Press run 2. Then write down input by this type Think my name is sahil and age is 20 I give input this type Sahil 20 Now code is run and give the result
1st May 2023, 1:00 PM
Sahil Vishwakarma
Sahil Vishwakarma - avatar
+ 1
Ya entendí, gracias NinjaGamer he vuelto hacer la prueba y ahora funciona perfectamente! 😎
30th Apr 2023, 6:39 PM
Jonathan Vasquez
Jonathan Vasquez - avatar
+ 1
I tested again and it works perfectly, thanks a lot Riya
30th Apr 2023, 6:42 PM
Jonathan Vasquez
Jonathan Vasquez - avatar
1st May 2023, 8:14 AM
Akhtar Sheikh
Akhtar Sheikh - avatar
+ 1
name = input() age = input() print("your name is " + name + " and your age is " + str(age))
1st May 2023, 8:36 AM
RAJ SONI😈😈
RAJ SONI😈😈 - avatar
0
Cuando agrego la entrada directamente en la variable o sea, "age=56" no tengo ningun error a la hora de ejecutar el codigo pero, cuando agrego la entrada "int(input())" es cuando me arroja el error.
30th Apr 2023, 5:35 PM
Jonathan Vasquez
Jonathan Vasquez - avatar
0
I add name and age but send me a error
30th Apr 2023, 5:39 PM
Jonathan Vasquez
Jonathan Vasquez - avatar
30th Apr 2023, 9:36 PM
NinjaGamer
NinjaGamer - avatar
0
P
2nd May 2023, 7:57 AM
ANDRI ADHI NUGROHO
ANDRI ADHI NUGROHO - avatar
0
Hello
2nd May 2023, 8:01 AM
Abdirahman Mohomoud
0
name = input() age = int(input()) print(f"Your name is {name} and your age is {age}.")
2nd May 2023, 12:01 PM
ボビー
ボビー - avatar
0
You code is correct, just might not run well on the app here
2nd May 2023, 3:24 PM
Thrills Family
Thrills Family - avatar