+ 1
Hello everyone! I am new with py and I was traying a simple code but send me a error... I need some help.
18 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
+ 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...
+ 7
You're welcome Jonathan Vasquez !!!
+ 2
The code works well, you need to enter:
Name
Age
+ 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
+ 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
+ 1
Ya entendí, gracias NinjaGamer he vuelto hacer la prueba y ahora funciona perfectamente! 😎
+ 1
I tested again and it works perfectly, thanks a lot Riya
+ 1
name = input()
age = input()
print("your name is " + name + " and your age is " + str(age))
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.
0
I add name and age but send me a error
0
P
0
Hello
0
name = input()
age = int(input())
print(f"Your name is {name} and your age is {age}.")
0
You code is correct, just might not run well on the app here